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:
- Created brand-new Trailhead Playground
- Reset Password
- 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
- Installed VSCode, version 1.78
- Installed Salesforce Expansion Pack (Expanded) version 60.0.0
- Installed NodeJS version 20.11.1
- 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"
- Set VSCode setting "salesforcedx-vscode-apex.java.home" as same path as above
- Created "Dreamhouse" project in VSCode via "SFDX: Create Project" in command palette
- Ran "SFDX: Authorize an Org" from VSCode command palette, and selected "Production" and org alias as "MyDevOrg"; successfully logged in via browser pop-up.
- 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
Jeff Weller (PARQA Inc.) Forum Ambassador
Hello@Chris Skutnik,
- Uninstall Salesforce CLI
- reInstall CLI Salesforce CLI
- See the Salesforce CLI Setup Guide for complete installation instructions and specifically for macOS and Windows.
- try to Re-authorize your org.
https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007TuIMASA3