Connection to RexQualis stopped working

Sorry to say that I find your post confusing. You're refering to both an Uno and a Mega. Is your problem with the Uno or with a Mega? Why do you compile for a Mega if you have an Uno?

Maybe this helps: the error message says [object Object] for some very strange reason - #13 by kgebhardt.
Found with arduino "[object object]" - Google Search