2

I authorized an org through VS Code, but at the bottom left it still says "No Default Org Set" rather than the org alias. I did this by running: sfdx force:auth:web:login --setalias vscodeOrg --instanceurl <my url here> --setdefaultusername I don't have the option "SFDX: Deploy this Source to Org". Why is this?

I'm suspecting maybe something with my CLI. I can do sfdx --version but running sfdx update says S3 host is not reachable.

I read in another post that running sfdx plugins:install @salesforce/sfdx-diff can fix the issue and I tried this, and got: ! 'ETIMEDOUT': connect ETIMEDOUT Finished digital signature check. Installing... done

Note: I tried setting the default org to the org I authorized. however, though it says "default org set", it doesn't show up on the bottom left. It still says "No Default Org Set". An error that shows up though is defaultusername This directory does not contain a valid Salesforce DX project. Add the --global flag to set config outside of a project.

So, I tried running sfdx force:config:set defaultusername=vscodeOrg -g and it just printed out:

=== Set Config
NAME             VALUE
───────────────  ─────────
defaultusername  vscodeOrg

And nothing happened.

1
  • Welcome to Salesforce Stack Exchange. What is your folder & file structure? Can you add a screenshot of the entire left side (if your UI is default) of your VS Code Explorer - including your folder structure (with any sensitive folder or file names, if there are any, obscured) and including the bar along the bottom where it says "No Default Org Set"?
    – Moonpie
    Jun 15 at 13:55
1

Related to SFDX update, probably because its related to some of the issues SF is facing in last few days(Service disruption with DNS/ISP etc).

You can try -

sfdx config:set defaultusername=<user_name>

Reference - https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_usernames_orgs.htm

8
  • Should the username be the org alias or my org login username?
    – Lia
    Jun 15 at 13:35
  • I tried this and it did not fix my No Default Org Set :(
    – Lia
    Jun 15 at 13:36
  • actual username. For the aliases, it has different commands given in the link
    – Ysr Shk
    Jun 15 at 13:36
  • with actual username or alias?
    – Ysr Shk
    Jun 15 at 13:37
  • 1
    Interestingly, restarting VSCode fixed the issue. Thanks!
    – Lia
    Jun 15 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.