Failed to obtain org list from CLI - message = no orgs can be found.
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)
-
repo owner -
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": [] }
-
repo owner Jarrod, have you authorized a dev hub? Note that you must do so as an OAuth connection. You can't use native connections to dev hubs to create scratch orgs. You can learn more about authorizing orgs using OAuth here:
-
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…
-
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.
-
reporter Scott,
That worked!!! Thanks so much for your help.
Jarrod
-
repo owner - changed status to resolved
Glad to hear! Thanks for letting me know, and let me know if you have any other issues.
- Log in to comment
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.