7

Not able to download all the classes / triggers / LWC's or anything using the ORG Browser. This is kind of a annoying issue as I cannot keep on downloading only and only the classes I require. Any work around for the following error:

Error running command sfdx.force.source.retrieve.component: data.forEach is not a function. This is likely caused by the extension that contributes sfdx.force.source.retrieve.component.

*Also I was able to sync before 1 - 2 hours, suddenly I am not able to do in any of my project.enter image description here

3
  • I caused it by deleting entire classes folder, there may have been some hidden files that I was not aware of, if it helps troubleshoot the issue Oct 19, 2020 at 12:18
  • I have now made a completely new project and I get the same error, must be a Visual Studio Code bug, it worked a few days ago Oct 19, 2020 at 12:44
  • github.com/forcedotcom/cli/issues/686
    – sv-alex
    Oct 20, 2020 at 16:26

5 Answers 5

2
sfdx force:project:create -n ProjectName --manifest

enter image description here

Right click on package.xml and click "SFDX: Retrieve Source...". You can download some resource. I have same error like this after I Re install my windows system and vscode

1
  • Right-clicking the manifest file and retrieving the source worked for me whereas when i was trying from the cloud (Org Browser) tab it was giving the error.
    – karan
    Oct 22, 2020 at 17:19
2

This issue was due to VS Code's Salesforce CLI Extension. Once you will revert it back to the last version or any future version the issue will be fixed.

1

I started getting this issue as soon as my Salesforce Extensions got updated to v50.1.0 in VS Code. After returning to the previous version being v49.13.0, everything restarted working.

1

I just updated the salesforce extensions to v50.2.0 and the issue has been resolved.

I have the same error, I believe after I updated Visual Studio or Salesforce Cli I was able to retrieve the code by typing this command on the terminal: sfdx force:source:retrieve -m [MetadataType]

for example:

     sfdx force:source:retrieve -m ApexClass
     sfdx force:source:retrieve -m ApexTrigger
     sfdx force:source:retrieve -m AuraDefinitionBundle
0

I had the same issue, and I had to Authorize dev hub and default org again. After that It started working properly. I'm not sure if maybe when you delete the classes folder It has some authorization information on any config file there.

You must log in to answer this question.

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