Failed to obtain org list from CLI - message = no orgs can be found.

Issue #1677 resolved
Jarrod Costopulos created an issue

Hi there,

I’m getting this error when trying to create a scratch org or any other time I click on anything involving the connection to salesforce. The dialog “Listing Salesforce CLI connections” will pop up and then the errors below are thrown. The “no Dev Hub found” error occurs when I click the “DX” button.

I’ve attached the debug log (DX scripts enabled for logging) below.

Please help!

Thanks in advance.


My versions/system information:


Error screenshots:

Comments (7)

  1. Scott Wells repo owner

    What happens if you run sfdx force:org:list --json from the command line? Does it exhibit the same behavior? If not I'll need to get a debug log from you for IC's execution of the CLI.

  2. Jarrod Costopulos reporter

    Hi Scott - here is what returns when I run the command. Is the idea.log file above not what you require? Sorry - I’m a student and wading my way through this!

    C:\Users\Jarrod>sfdx force:org:list --json
    {
      "status": 1,
      "name": "noOrgsFound",
      "message": "No orgs can be found.",
      "exitCode": 1,
      "actions": [
        "Use one of the commands in force:auth or force:org:create to add or create new scratch orgs."
      ],
      "commandName": "OrgListCommand",
      "stack": "noOrgsFound: No orgs can be found.\n    at OrgListCommand.run (C:\\Program Files\\Salesforce CLI\\client\\node_modules\\salesforce-alm\\dist\\commands\\force\\org\\list.js:39:23)",
      "warnings": []
    }
    

  3. Jarrod Costopulos reporter

    Ok - I authorized an existing org with OAuth that has Dev Hub enabled. The org authorized correctly - but then is telling me that it isn’t a dev hub…which it is…

  4. Scott Wells repo owner

    Make sure that you're updated to the latest build (released this morning) which works around an issue in the CLI that doesn't properly report dev hubs. Once you're updated to 2.1.3.1, make sure that your dev hub is set as the default dev hub in the CLI, then click the refresh toolbar button (right-most one) and let me know if that doesn't properly reflect the status of your dev hub.

  5. Log in to comment