[SalesForce] sfdx force:mdapi:retrieve — UNKNOWN_EXCEPTION, what to do with it

I am trying to set up SDX following this guide. But I get absolutely non-intuitive and non-friendly error.

ERROR: The metadata retrieve operation failed: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 439815928-31487 (-2038997134).

Do please anyone know what can I do with this?

Best Answer

This is a "gack." Basically, the system ran into a situation it could not handle, and could not properly generate a friendly error for. To get more information, you'll need to contact technical support so they can research the issue. Nobody outside of salesforce.com employees can give you any sort of definitive answer (unless they've experienced this specific gack before, and already got an answer from someone in technical support, or were lucky enough to puzzle it out themselves).

Other than that, make sure that you've created a project directory already, that the user successfully authenticated, that you're using the right org, that you haven't misspelled anything, that your org has API access, that you're using the latest version of the CLI, things like that. Typically, if you've gotten a gack like this, you've managed to skip one or more critical steps. You might want to start over with a fresh project directory and see if that helps.

You might also want to read "What Is A Gack?". Basically, the numbers involved are a type of serial number that references the internal logging system, so the numbers don't mean anything to anyone outside of the platform. This is contrarwise to something like a Microsoft Error Code, where each code actually directly relates to a specific error that you can search for in public documentation.