I've created over 40 scratch orgs with the following config, without issues.

 {
 "orgName": "MyScratchOrg",
 "edition": "Developer",
 "features": ["Communities","PersonAccounts","SiteDotCom","ContactsToMultipleAccounts"],
 "orgPreferences" : {
 "enabled": ["S1DesktopEnabled","NetworksEnabled"]
 }
 }

Today I tried to spin up a new one (actually two, one after the other), everything went well, but the deployment failed when deploying the community/network/site stuff with the following message:

> Apex class 'SiteLoginController' does not exist

This is a class that should be automatically created once you enable communities right?

So far I've only found [this][1]

> Salesforce CLI Sometimes Doesn’t Recognize Scratch Orgs with
> Communities Description: Sometimes, but not in all cases, the
> Salesforce CLI doesn’t acknowledge the creation of scratch orgs with
> the Communities feature. You can’t open the scratch org using the CLI,
> even though the scratch org is listed in Dev Hub. Workaround: You can
> try this workaround, although it doesn’t fix the issue in all cases.
> Delete the scratch org in Dev Hub, then create a new scratch org using
> the CLI. Deleting and recreating scratch orgs counts against your
> daily scratch org limits.
> 
> Error Occurs If You Pull a Community and Deploy It Description: The
> error occurs because the scratch org doesn’t have the required guest
> license. Workaround: In your scratch org definition file, if you
> specify the Communities feature, also specify the Sites feature.

In my case, I've got enough licenses, I've specified both Communities and Sites, and I can actually login to the scratch org, therefore this limitation is probably not the culprit...

Anyone else experienced this? What else could be the issue?

**Update:**
*I was able to create a third scratch org today, this time without issues. I'd still like to get to the bottom of this and find out what causes this intermittent issue...*

**Another Update**
*I tried to run 2 bitbucket pipelines in parallel which create scratch orgs (to test the theory of possible issue with parallel creation/deployment), however this time around one succeeded, whereas the second threw yet another new error:*

> 'ENOTFOUND': getaddrinfo ENOTFOUND

Which I guess might be related to the subdomain not yet propagated through the DNS servers... In any case, I'll be opening a case with support...


 [1]: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_considerations.htm