1

I have a command in the CI to create a scratch org

sfdx force:org:create -f config/project-scratch-def.json -a scratch-org -s -d 1 -u Prod --json

Whether I execute it through the CI or manually, I got the following error:

{
  "status": 1,
  "name": "DomainNotFound",
  "message": "The org cannot be found",
  "exitCode": 1,
  "actions": [
    "Verify that the org still exists',",
    "If your org is newly created, wait a minute and run your command again',",
    "If you deployed or updated the org's My Domain, logout from the CLI and authenticate again\",",
    "If you are running in a CI environment with a DNS that blocks external IPs, try setting SFDX_DISABLE_DNS_CHECK=true'"
  ],
  "context": "Create",
  "stack": "DomainNotFound: The org cannot be found\n    at Messages.createError (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/messages.js:446:16)\n    at Connection.isResolvable (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:244:28)\n    at async Connection.retrieveMaxApiVersion (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:190:9)\n    at async Connection.useLatestApiVersion (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:214:32)\n    at async Connection.create (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:98:17)\n    at async Org.init (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/org.js:766:31)\n    at async Org.create (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/kit/lib/creatable.js:57:9)\n    at async scratchOrgCreate (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/scratchOrgCreate.js:174:24)\n    at async Create.createScratchOrg (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/plugin-org/lib/commands/force/org/create.js:187:68)\n    at async Create._run (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/command/lib/sfdxCommand.js:102:40)\nCaused by: MyDomainResolverTimeoutError: The client has timed out.\n    at PollingClient.subscribe (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/status/pollingClient.js:91:19)\n    at async MyDomainResolver.resolve (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/status/myDomainResolver.js:103:45)\n    at async Connection.isResolvable (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:239:13)\n    at async Connection.retrieveMaxApiVersion (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:190:9)\n    at async Connection.useLatestApiVersion (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:214:32)\n    at async Connection.create (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/connection.js:98:17)\n    at async Org.init (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/org.js:766:31)\n    at async Org.create (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/kit/lib/creatable.js:57:9)\n    at async scratchOrgCreate (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/core/lib/org/scratchOrgCreate.js:174:24)\n    at async Create.createScratchOrg (/Users/bdovh/.local/share/sfdx/client/7.182.1-dad7ae3/node_modules/@salesforce/plugin-org/lib/commands/force/org/create.js:187:68)",
  "warnings": [],
  "commandName": "Create"
}

I don't understand why this error happens and how to fix it or find a workaround to it?

I can see the production org has the correct enhanced domain and the Sfdx Auth Url is correct and has not been changed. What is wrong here?

I have created a github issue here https://github.com/forcedotcom/cli/issues/1874

1 Answer 1

0

The problem has magically disappeared as of January 12th 2023 14:41 GMT.

Hopefully it won't reoccur again.

You must log in to answer this question.

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