0

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: test-uuplqwe9abid@example.com. 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

  • 1
    What does your Scratch Org Definition File look like? – Kris Goncalves Jan 17 at 12:59
  • @KrisGoncalves Where can I find definition file? – Dilip Irabatti Jan 17 at 13:20
  • config --> project-scratch-def.json – Kris Goncalves Jan 17 at 13:38
0

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.

| improve this answer | |
  • 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 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. – Fabien Taillon Jan 17 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 – Dilip Irabatti Jan 20 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 – Dilip Irabatti Jan 20 at 10:34
  • Can you try recreating the scratch org with an increased wait flag ? Like --wait 60 ? – Fabien Taillon Jan 20 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.