Can’t open Scratch org via sfdx:org:open or URL

salesforcedxsalesforcedx-clitimeout

For the last week I was unable to work with scratch orgs on multiple computers, multiple networks and DevHubs. Simply because I am not able to open the always successfully created scratch orgs.

No matter the method. Be it:

  • sfdx force:org:open
  • or getting the URL directly from the CLI

When calling sfdx force:org:open I always see:

Opening org 00D1x0000002UvzEAE as user [email protected]
Waiting to resolve the Lightning Experience-enabled custom
domain…… done ERROR running force:org:open: The client has timed
out. 15:56:38.152 sfdx force:org:open ended with exit code 1

I tried all of the below without any improvement

  1. Different Computer
  2. Different Network
  3. Switch my Macs DNS from Default to Google 8:8:8:8
  4. Upgrade CLI to latest
  5. Unistall CLI and install Current
  6. Use multiple DevHubs

BUT: when I use a different project everything works like a charm.

Best Answer

Right now (20 June 2022), I'm getting the same error.

I don't think it's the same problem as you were getting Robert, but if people are googling for the same error message, then this is a solution they can use...

The CLI team say:

Seems enhanced domains is being enabled automatically in new sboxes, we got a fix for this but in the meantime you can get the url from org:display

https://github.com/forcedotcom/cli/issues/1556#issuecomment-1155268803

The quick version of the workaround (also from that GitHub issue) is:

macOS:

open $(sfdx force:org:display -u <sandbox-username> --json | jq -r '.result.instanceUrl')

linux:

xdg-open $(sfdx force:org:display -u <sandbox-username> --json | jq -r '.result.instanceUrl')

Obviously, you need jq to do that, but jq is great anyway.

Related Topic