10

I had a couple of scratch orgs created early last week and I was using these happily through until Friday evening. However, this AM when I try to access them using a command like:

sfdx force:org:open -u alias

the command simply hangs. Note that the scratch orgs have not expired - they are valid for the rest of this week at least.

What's going on and how can I fix this?

3 Answers 3

5

This issue is due to Spring '20 and can happen with new scratch orgs too. Not all sandbox pods are affected.

The event emitter warning has nothing to do with the actual problem. The underline issue is a redirect from https://..my.salesforce.com to https://.my.salesforce.com. When redirecting to a different host, authorization headers are removed which causes an invalid token problem. The CLI then tries and fetch a new token. Once we have the token, we try the API call again which does the same thing, leaving the CLI in an infinite loop (hence the CLI hanging.

Edit: As of 1/8/20, I believe this issue has been fixed for all sandbox pods. If still seeing similar problems, please comment if with what CS instance the scratch org is on.

8

On inspection I saw that the POD (instance) on which my scratch orgs exist had been upgraded to Spring '20 on Saturday.

The only solution I could find was to delete my scratch orgs and re-create them using the original aliases. Having done this the problem went away.

I guess Spring '20 doesn't play nice with Winter '20 scratch orgs.

4
  • Same issue - scratch was working fine on Friday, and not due to expire until Feb. Created new scratch now, and went straight in - new org is still on Winter 20, but I guess something about auth got screwed up? Commented Jan 6, 2020 at 23:44
  • 1
    Yeah I reckon something got borked pretty bad. I was using a scratch org Friday no problems, today I was getting some commands hanging, others throwing weird Node issues about too many event listeners being added. Sure they ephermal things, but I don't expect them to get blown away before the expiration date.
    – Matt Lacey
    Commented Jan 7, 2020 at 3:33
  • Related fix coming in this week's CLI release: github.com/forcedotcom/cli/issues/216#issuecomment-571635087
    – Mark Pond
    Commented Jan 7, 2020 at 23:40
  • That doesn't match my experience where opening the scratch org was suddenly borked without any client-side changes and without any warnings being raised. It appears to be related in part to what Matt Lacey commented only.
    – Phil W
    Commented Jan 8, 2020 at 7:03
1

This has been happening to me since around October 2019. Running on Windows. Have a suspicion that it could be caused by a strict security settings of my Windows.

You can always copy'n'paste the URL printed for you /secur/frontdoor.jsp

4
  • Sounds like a different issue to me. All was fine with no client-side changes on the day before the POD update to Spring '20 then broken afterwards still with no client-side changes.
    – Phil W
    Commented Jan 8, 2020 at 7:05
  • Also, not sure what you mean by the URL printed for you...
    – Phil W
    Commented Jan 8, 2020 at 7:05
  • sfdx force:org:open -u ... displays a link you can copy and paste into the browser 😉 Commented Jan 9, 2020 at 9:46
  • IIRC, when it was stuck I saw no output from the command, so the URL wasn't visible. Anyhoo, as per Amphro's post, what I posted about is a Spring '20 platform issue.
    – Phil W
    Commented Jan 9, 2020 at 11:58

You must log in to answer this question.

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