salesforcedx-vscode: Retrieve fails to find salesforce.salesforcedx-vscode-core-57.13.1\messages

Summary

When trying to retrieve using right-click + “SFDX: Retrieve Source From Org” option in VS Code or when using the Org Browser to pull source I receive the following error:

ENOENT: no such file or directory, scandir 'c:\Users\drewt\.vscode\extensions\salesforce.salesforcedx-vscode-core-57.13.1\messages'

Steps To Reproduce:

  1. Create new sfdx project, and connect to a default org (dev sandbox)
  2. navigate to Org Browser, click download icon to start retrieve or
  3. Create new sfdx project, and connect to a default org (dev sandbox)
  4. Create new apex class and deploy to org using, right-click + “SFDX: Deploy Source to Org” option
  5. Right-click deployed apex file, choose “SFDX: Retrieve Source From Org”

Expected result

The selected source file is retrieved from the default org (dev sandbox).

Actual result

ENOENT: no such file or directory, scandir 'c:\Users\drewt\.vscode\extensions\salesforce.salesforcedx-vscode-core-57.13.1\messages'

Additional information

image

“versionDetail”: { “cliVersion”: “sfdx-cli/7.194.1”, “architecture”: “win32-x64”, “nodeVersion”: “node-v18.14.0”, “osVersion”: “Windows_NT 10.0.19045”, “shell”: “cmd.exe”, “rootPath”: “C:\Users\drewt\AppData\Roaming\npm\node_modules\sfdx-cli”, “pluginVersions”: [ “@oclif/plugin-autocomplete 2.1.6 (core)”, “@oclif/plugin-commands 2.2.11 (core)”, “@oclif/plugin-help 5.2.8 (core)”, “@oclif/plugin-not-found 2.3.22 (core)”, “@oclif/plugin-plugins 2.4.3 (core)”, “@oclif/plugin-search 0.0.14 (core)”, “@oclif/plugin-update 3.1.8 (core)”, “@oclif/plugin-version 1.3.1 (core)”, “@oclif/plugin-warn-if-update-available 2.0.32 (core)”, “@oclif/plugin-which 2.2.17 (core)”, “apex 2.2.7 (core)”, “auth 2.7.10 (core)”, “community 2.2.8 (core)”, “custom-metadata 2.1.9 (core)”, “data 2.3.8 (core)”, “info 2.6.2 (core)”, “limits 2.3.9 (core)”, “org 2.6.2 (core)”, “packaging 1.16.2 (core)”, “schema 2.3.4 (core)”, “settings 1.4.2 (core)”, “signups 1.4.8 (core)”, “source 2.8.0 (core)”, “telemetry 2.1.3 (core)”, “templates 55.4.4 (core)”, “trust 2.4.5 (core)”, “user 2.3.5 (core)”, “@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)”, “@salesforce/sfdx-scanner 3.9.0 (user)”, “sfdx-affirm 3.0.0 (link) C:\Users\drewt\hunterDouglasDev\repos\sfdx-affirm”, “sfdx-cli 7.194.1 (core)” ] }, Salesforce Extension Pack Version: v57.13.1 Vs Code Details: Version: 1.78.2 (user setup) Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435 Date: 2023-05-10T14:39:26.248Z Electron: 22.5.2 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: No

Edit: Added Salesforce Extension Pack Version + VS Code Deatils

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

Hey @dt-snyder, I was facing the same issue from yesterday afternoon. The below solution worked for me:

  • logout from org
  • authorize with the same org
  • Restart VS Code I was able to retrieve the code from the org. back in business 😉

@kishorementa our version of “Have you tried turning it off and turning it on again” 😄 I’m hopeful this resolves it for you as well @dt-snyder!

Good clarification @BenedyktDuch! Running the command SFDX: Log Out from Default Org should also do the trick.

@randi274 removing the org, reauthorizing it, then restarting or reloading vs code fixed my issue.

For all people who are looking for solution. In my case the step for removing the already authorized org was crucial. Reauthorizing the already authorized org is not enough. You should use sfdx force:auth:logout -u “hub alias” command to firstly remove the org and then you can add it again. After performing those steps I had to reset PC to make it working 😃

Also, I tested those other instances in my new project and they worked as well. It seems that my drewDev3 sandbox will not allow me to use the SFDX: Retrieve Source From Org but all the other orgs I’m authorized to work fine regardless of what project I’m in.