Skip to main content

Trailhead trail click path:

Platform Developer Beginner -- Get Started with Salesforce Development -- Create a Data Model Using Clicks -- Retrieve Metadata from Salesforce to the Local Project:

 

Hey folks.  I have followed the first module in "Get Started with Salesforce Development" and now am stuck on the second.  When I try to retrieve the custom object created earlier in this module, I get the following error in VSCode:

 

ERROR: "Error fetching metadata for org. Run "SFDX: Authorize an Org" to authorize your org again."

 

Steps accomplished so far:

  1. Created brand-new Trailhead Playground
  2. Reset Password
  3. Installed SF CLI and validated install via "sf update" terminal command.  Version is currently...
    • @salesforce/cli/2.29.5 win32-x64 node-v20.11.0
  4. Installed VSCode, version 1.78
  5. Installed Salesforce Expansion Pack (Expanded) version 60.0.0
  6. Installed NodeJS version 20.11.1
  7. Installed Adoptium Temurin 17 (LTS) version 17.0.10+7 and set system environment path variable path to "C:\Program Files\Eclipse Adoptium\jdk-17.0.10.7-hotspot"
  8. Set VSCode setting "salesforcedx-vscode-apex.java.home" as same path as above
  9. Created "Dreamhouse" project in VSCode via "SFDX: Create Project" in command palette
  10. Ran "SFDX: Authorize an Org" from VSCode command palette, and selected "Production" and org alias as "MyDevOrg"; successfully logged in via browser pop-up.
  11. Installed npm; current version is 10.1.0

Despite having done all of that, I continue to receive the "Error fetching metadata for org. Run "SFDX: Authorize an Org" to authorize your org again" no matter how many times I reauthorize the Org.

 

In my troubleshooting, I also confirmed that my System Administrator profile (to which I belong) currently has "API Enabled" set to TRUE in the profile's Administrative Permissions section.  I then tried running "sfdx force:auth:device:login", although now I suspect that this is a deprecated command, even though it successfully worked and had me enter a authentication code into the browser.

 

(I do see one potential solution in https://salesforce.stackexchange.com/a/317889, but have not yet had a chance to attempt it yet... I'll have a go at it tomorrow.)

 

I do not know what else to do... does anybody have any suggestions?

 

Thank you very much for your help!

 

#Trailhead Challenges  #Trailhead  #Developer Beginner  #Salesforce Developer

4 respuestas
  1. Divs Chauhan (kcloud) Forum Ambassador
    23 feb 2024, 6:41

    Hello@Chris Skutnik,

     https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007TuIMASA3

0/9000