14

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?

5
  • 2
    Could you add more details on this ? Oct 10, 2018 at 17:12
  • Sure - I created a new scratch org yesterday through the command line. I open the scratch org to make changes directly through Salesforce UI. Close the browser. The next time I try to open my scratch org via the command line: sfdx force:org:open a browser window opens, but I get the failed login attempt instead, as if it's a bad password error.
    – Kelly Wood
    Oct 10, 2018 at 19:07
  • I'm also experiencing this issue with a scratch org I created yesterday, but no others. I wasn't even able to get the sfdx force:org:open command to work the first time. I was able to login by using the force:user:password:generate command and logging in the old-fashioned way. Oct 17, 2018 at 18:03
  • I just created a scratch org today and that one works fine. I think I may have figured out the issue and will post an answer momentarily. Oct 17, 2018 at 18:13
  • I can confirm that this is still happening. Once the redirect has taken you to 'test.salesforce.com', you can change the address to your domain, eg 'power-ability-9295-dev-ed.lightning.force.com' and you will be able to log in again.
    – mattk
    Oct 4, 2019 at 8:29

2 Answers 2

9

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.")

Failing Example

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]

Working Example

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)

Solution

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.

Alternative Solution

An alternative solution is to generate a password for the user via the sfdx force:user:password:generate command and logging in that way.

3
5

We are in the process of fixing this issue and will be pushing the fix by the end of next week.

10
  • 4
    who is 'we' ? possible to disclose your affiliation and or udpate your profile, thanks =)
    – glls
    Oct 17, 2018 at 22:17
  • 1
    Welcome to SFSE Claire! Hope you don't mind but I checked your email address and I can confirm that Claire is from Salesforce :)
    – Matt Lacey
    Oct 18, 2018 at 10:03
  • Yes, sorry I am the PM for the Salesforce CLI. Oct 19, 2018 at 18:03
  • @ClaireBianchi - FYI, this just happened to me today (2nd Nov). Workaround below resolved it.. on latest DX CLI. Nov 2, 2018 at 2:33
  • 2
    Still happening... any update on SF progress on that?
    – Wookie88
    May 29, 2019 at 9:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .