Adding the "WorkThanksPref" to a scratch org definition file is preventing a scratch org from coming up. The error is:

An unknown server error occurred. Please try again. If you still see this error, contact Salesforce support for assistance. Include the information from "sfdx force:data:record:get -s ScratchOrgInfo ...

If it matters, here's the whole file:

    "orgName": "Scratch Test",
    "edition": "Enterprise",
    "features": [
  • 3
    We've been receiving HUGE numbers of these errors generating scratch orgs over the past few days/weeks. Usually within our CI process. Some scratch creations work, some fail, try and retry again. Eventually, it will be successful. This isn't a case of hitting the active scratch org limit, there's something else going on with the platform. – Mark Pond Jun 4 at 2:24

Edit: As the comment on the question points out, this may also be due to flakiness of Salesforce scratch org creation rather than a configuration issue. I received three errors in a row trying to deploy the scratch org def in question and the error went away after removing extra scratch orgs, but that may have just been a coincidence.

Orinal answer:

Sigh... I think this is yet another pitfall of Salesforce having poor error messages.

After logging in to my production instance and going to App Launcher > Active Scratch Orgs, I found there were 28 active scratch orgs. This is far less than the limit Salesforce claims to have, but after deleting a bunch of these, my scratch org is now initializing.

Developing with scratch orgs on Salesforce is a painful experience. There are so many pitfalls.

| improve this answer | |

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.