Can't create a new site

What issue or error are you experiencing?

displays error Uh-oh! Unable to start site.

System Details: Acer, windows 10pro,core i5

  • **Local Version: 8.3.2+ 6660

Please how can I resolve this?

Hey @Kay1 – Welcome to the Local Community Forums!

It’s hard to say what the actual error is without more detailed information.

Can provide the Local Logs? You can get a zip of those logs by clicking the “Download Local Log” button from the “Support” tab of Local. See this help doc for more information:

After getting those logs, you can attach the zip to this reply and we should be able to offer a little more insight into what’s going on.

Dear Ben.turner a local log has been provided.Please check and help. Thank you
local-logs.zip (19.8 KB)

There are a few interesting lines in the log:

{"class":"LightningServicesService","code":"ENOTFOUND","errno":"ENOTFOUND","level":"error","message":"request to https://getflywheel.github.io/local-lightning-services/site-services-v2.json failed, reason: getaddrinfo ENOTFOUND getflywheel.github.io","stack":"FetchError: request to https://getflywheel.github.io/local-lightning-services/site-services-v2.json failed, reason: getaddrinfo ENOTFOUND getflywheel.github.io\n    at ClientRequest.<anonymous> (%%appPath%%\\node_modules\\node-fetch\\lib\\index.js:1491:11)\n    at ClientRequest.emit (node:events:525:35)\n    at ClientRequest.emit (node:domain:489:12)\n    at TLSSocket.socketErrorListener (node:_http_client:502:9)\n    at TLSSocket.emit (node:events:513:28)\n    at TLSSocket.emit (node:domain:489:12)\n    at emitErrorNT (node:internal/streams/destroy:151:8)\n    at emitErrorCloseNT (node:internal/streams/destroy:116:3)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","thread":"main","timestamp":"2024-04-10T11:24:03.218Z","type":"system"}
...
{"class":"HostsFileService","error":{},"exitCode":{},"level":"error","message":"Could not update hosts.","stderr":{},"stdout":{},"thread":"main","timestamp":"2024-04-10T11:24:13.570Z"}
...
{"class":"SiteProcessManagerService","level":"error","message":"Unable to start site.","stack":"TypeError: Cannot read properties of null (reading 'waitForDB')\n    at SiteDatabaseService.<anonymous> (%%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:2971)\n    at Generator.next (<anonymous>)\n    at %%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:1047\n    at new Promise (<anonymous>)\n    at __awaiter (%%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:792)\n    at SiteDatabaseService.waitForDB (%%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:2845)\n    at SiteProcessManagerService.<anonymous> (%%appPath%%\\main\\sites\\SiteProcessManagerService.js:62:3252)\n    at Generator.next (<anonymous>)\n    at n (%%appPath%%\\main\\sites\\SiteProcessManagerService.js:1:132)","thread":"main","timestamp":"2024-04-10T11:26:39.413Z"}
...
{"class":"SiteProvisionerService","level":"error","message":"Unable to provision site.","stack":"TypeError: Cannot read properties of null (reading 'waitForDB')\n    at SiteDatabaseService.<anonymous> (%%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:2971)\n    at Generator.next (<anonymous>)\n    at %%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:1047\n    at new Promise (<anonymous>)\n    at __awaiter (%%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:792)\n    at SiteDatabaseService.waitForDB (%%appPath%%\\main\\sites\\database\\SiteDatabaseService.js:1:2845)\n    at SiteProcessManagerService.<anonymous> (%%appPath%%\\main\\sites\\SiteProcessManagerService.js:62:3252)\n    at Generator.next (<anonymous>)\n    at n (%%appPath%%\\main\\sites\\SiteProcessManagerService.js:1:132)","thread":"main","timestamp":"2024-04-10T11:26:48.481Z"}

Those lines roughly say that:

  1. Local can’t reach out to https://getflywheel.github.io/local-lightning-services... to get some additional services (like different PHP or MySQL versions)
  2. Local can’t edit the HostsFile
  3. Local can’t start the Database for the site
  4. Because Local can’t start the database, it also can’t finish creating the site

Taken together, that all feels like maybe Local doesn’t have the permissions granted that it needs to work.

A few things I’d recommend checking on:

  • Does this computer have any antivirus software installed? If you do, you might temporarily disable it to see if that let’s local provision a new site. If that does work, then I’d recommend looking into the antivirus’ settings to allow Local to do the things it needs to do.
  • When creating the site, there should have been a few popups asking for permission to start. These would have been the MySQL process along with a couple of Nginx processes as well as a prompt to edit the hosts file. If you didn’t click to allow those things to start, then Local wouldn’t be able to finish provisioning the site.

Ben.turner tried that but still not working. Maybe I’ll uninstall , remove antivirus then re-install. I’ll get back
I appreciate the response.

2 Likes