1

I am trying to retrieve the Salesforce metadata in VS Code with the below command,

sfdx force:source:retrieve -x ./manifest/package.xml

This was working fine prior to today, but suddenly I have started getting the below error:

ERROR running force:source:retrieve: Cannot read property 'id' of undefined

I have recreated the project repository and tried this again, but no success.

Below is the package.xml

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>ApexClassName</members>
        <name>ApexClass</name>
    </types>
    <version>51.0</version>
</Package>

How can the above error be resolved. Any idea?

4
  • Could you please share your package.xml file?
    – Mehedi
    Commented Aug 12, 2021 at 18:04
  • The package.xml is the same as before when it was working. Anyways I have added it to the question now Commented Aug 12, 2021 at 18:14
  • Did you try updating salesforcedx? Command: sfdx update
    – Mehedi
    Commented Aug 13, 2021 at 3:02
  • Yes, its updated Commented Aug 13, 2021 at 4:23

1 Answer 1

2

This issue was occuring due to Salesfoce CLI update.

It has been resolved with the latest release 7.115.0

Refer here for details on the issue and resolution

1
  • I'm getting this error as of 2/22/22 using latest sfdx-cli (7.138.1). Any ideas/advice? Commented Feb 22, 2022 at 15:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .