2

I recently started getting an error when I switch from one authenticated Salesforce environment to another in VS Code:

enter image description here

The Salesforce CLI output shows a conflicting message:

Starting SFDX: Set a Default Org

14:55:21.703 sfdx force:config:set defaultusername=SBX1
=== Set Config

 Name            Value Success 
 ─────────────── ───── ─────── 
 defaultusername SBX1  true    
14:55:31.906 sfdx force:config:set defaultusername=SBX1
 ended with exit code 1

On the one hand, it shows "true" for "Success" in the output table. And in fact I know it hasn't failed, because I can interact with the new default org as usual. But it's returning exit code 1, which stands for a generic failure.

Is this a new bug in the Salesforce CLI? In Salesforce Extensions for VS Code? Could it be something I messed up in my local VS Code settings?

1 Answer 1

0

Firstly close the VS code in the task manager and reopen the VS Code app and then click again on Authorise Org.

If the above solution did not work then follow the following steps:

  1. Download Salesforce cli and install.
  2. Open Command prompt and write - sfdx update. It will update CLI to the latest version.
  3. After this go to Vs code and try to authorize again.
1
  • Thanks sir after end vsd in task manager & tri it's running properly and authentication done Commented Mar 24 at 12:43

You must log in to answer this question.

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