I have two scratch orgs that I’ve created this week, post Winter Release, that will not open from the command line using sfdx force:org:open. The login fails and I’m stuck staring at the login screen. Another dev on my team just experienced the same issue. Has anyone else?
I also experienced this issue this week and, while I’m not sure of the cause of it, I believe it has something to do with the URL that is generated by the SFDX CLI. This might be a bug that can be filed with the SFDX team. (Update: According to Salesforce, “we are pushing a fix in this weeks CLI release.”)
For the scratch org that doesn’t auto log me in from the CLI via
sfdx force:org:open -u [OrgName], this message is generated:
Access org ### as user test-[removed]@example.com with the following URL: https://cs50.salesforce.com/secur/frontdoor.jsp?sid=[removed]
For the scratch org that works as expected, this message is generated:
Access org ### as user test-[removed]@example.com with the following URL: https://computing-ruby-1278-dev-ed.cs24.my.salesforce.com/secur/frontdoor.jsp?sid=[removed]
In the example output where the CLI command works, notice that the My Domain is included in the URL (computing-ruby-1278-dev-ed)
If you grab the My Domain part of the URL when redirected to the login page, you should be able to login successfully by modifying the generated URL to include the My Domain.
An alternative solution is to generate a password for the user via the
sfdx force:user:password:generate command and logging in that way.