SFDX unable to retrieve metadata from org using package xml
Summary
Hi team, I faced this issue a couple of times already and no idea how to work around this. I was attempting to retrieve the metadata from my sandbox through the sfdx command and via the "SFDX: Retrieve Source in Manifest from Org" option found when you right-click the package.xml file. I wasn't to able retrieve the metadata either way, so I am stuck. When I did run the sfdx command through the terminal, it returned an error, with ErrorId: 1053297883-218606 (796380918)
Hope that ErrorId has some use. I noticed there were other issues similar to mine, and in one of the issue thread, someone requested to run the sfdx retrieve command with the "--dev-debug" keywords at the end of the command and I managed to find out what the error is, attached in the screenshot below. Please let me know if you need any other information, thank you for your help in advance!
Steps To Reproduce:
- Create a new project with SFDX: Create a Project with Manifest.
- Authorize any org (Dev Org/Sandbox/Production) doesn't matter
- Try to retrieve the code from Package.xml (Package xml contains a whole list of metadata)
- You'll find the "Unknown Exception" in the Output Panel of the VSCode
Expected result
The code should get retrieved which is defined in the package.xml
Actual result
Received an UNKNOWN_EXCEPTION: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1867538256-242753 (796380918) error message
Additional information

Salesforce Extension Version in VS Code: v54.5.0
SFDX CLI Version: sfdx-cli/7.140.0 darwin-x64 node-v16.14.0
OS and version: macOS Monterrey
Thanks for reporting this, and going the extra step of troubleshooting with the CLI. Since you're having the same issue running through sfdx, I'm going to transfer this one to our CLI team for further help.
Hi @hreethwan, is this issue consistently reproducible? The please include this ErrorId... message is coming from the server so I don't believe it's anything related to the client-side CLI. Have you tried converting it to mdapi-format and using force:mdapi:retrieve? That'll tell us if it's a client-side or server-side issue
Hi @WillieRuemmele thank you for following up. I was attempting to retrieve the metadata from the org again today, using sfdx force:source:retrieve. The Error Id I received is somewhat similar --> UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 511912618-81534 (796380918)
I attempted the metadata retrieval using the mdapi-format using this command -->sfdx force:mdapi:retrieve -u marsuat -k manifest/package.xml -r /Users/hreethwan/Desktop This time, I am getting another error: Element {http://soap.sforce.com/2006/04/metadata}type invalid at this location in type Package
I noticed that this "http://soap.sforce.com/2006/04/metadata" url was part of parameter in my package.xml, but even after deleting it, I received the same error. Any advice on what I should do?
Thanks for trying that, did you run sfdx force:source:convert and then the mdapi:deploy?
This issue has not received a response in 60 days. It will auto-close in 7 days unless a response is posted.