1

I have authorized dev hub org successfully and now trying to create default scratch org using visual studio code but getting following error:

sfdx force:org:create -f config\project-scratch-def.json --setalias LightningWebComponent --setdefaultusername

ERROR running force:org:create: Successfully created org with ID: 00DN0000000CgnWMAS and name: [email protected]. However, the My Domain URL https://innovation-ability-7287-dev-ed.cs6.my.salesforce.com/ has not finished propagating.

Some commands may not work as expected until the My Domain DNS propagation is complete.

sfdx force:org:create -f config\project-scratch-def.json --setalias LightningWebComponent --setdefaultusername ended with exit code 1

3
  • 2
    What does your Scratch Org Definition File look like? Jan 17, 2020 at 12:59
  • 1
    @KrisGoncalves Where can I find definition file? Jan 17, 2020 at 13:20
  • 1
    config --> project-scratch-def.json Jan 17, 2020 at 13:38

1 Answer 1

3

This is not really an error. You just need to wait a few more minutes for the Domain Name to be propagated.

Just try to open the org with sfdx force:org:open later, and it will work.

If you want the command to exit with a non error exit code, you can just increase the timeout using the --wait flag, so that the DNS has the time to propagate:

sfdx force:org:create -f config\project-scratch-def.json --setalias LightningWebComponent --setdefaultusername --wait 30

Most likely, if you just retry to create a scratch org as is it will just work.

6
  • tailon the response from the sfdx command run says Error but as you are saying this is not an error I am confused. In the event if devhub does not have mydomain enabled would it not be erroring - but as per my understanding If you don’t enable and deploy My Domain, you can’t link your namespace to the Dev Hub org. Are you hinting the error is misnomer in this scenario and the scratchorg did create
    – Mitesh
    Jan 17, 2020 at 16:40
  • The error is about the scratch org domain, not dev hub one. The error is more something like « the scratch org is not ready yet, wait a few more minutes ». If you try to open the scratch org it will work. Jan 17, 2020 at 17:30
  • @FabienTaillon Tried as you described. Ran sfdx force:org:open command after some time. Now, it throwing following error: ERROR running force:org:open: No AuthInfo found for name LightningWebComponent Jan 20, 2020 at 10:31
  • @FabienTaillon tried one more command as well: Starting SFDX: Open Default Scratch Org sfdx force:org:open ERROR running force:org:open: No AuthInfo found for name LightningWebComponent sfdx force:org:open ended with exit code 1 Jan 20, 2020 at 10:34
  • Can you try recreating the scratch org with an increased wait flag ? Like --wait 60 ? Jan 20, 2020 at 11:06

You must log in to answer this question.

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