Hey! Thought I’d throw in my 10 cents! I am having the same issue here, a month later. I am running Debian. Local installs fine. I go in to create new site and I get 3 pop ups with the same vague error message. I am prompted to authenticate for the host file change twice then the process fails. When I use the locahost router, everything works fines.
Here is, I believe, the relevant log info:
{"thread":"main","class":"SiteProvisionerService","stack":"Error: spawnSync getcap ENOENT\n at
Object.spawnSync (internal/child_process.js:1067:20)\n at spawnSync (child_process.js:611:24)\n
at Object.execFileSync (child_process.js:638:15)\n at Object.func [as execFileSync]
(electron/js2c/asar_bundle.js:5:1846)\n at RouterService.doesNginxNeedBindCap
(%%appPath%%/main/router/RouterService.js:1:6667)\n at RouterService.<anonymous>
(%%appPath%%/main/router/RouterService.js:1:2769)\n at Generator.next (<anonymous>)\n at
n (%%appPath%%/main/router/RouterService.js:1:132)","level":"error","message":"Unable to
provision site.","timestamp":"2021-05-18T14:42:28.638Z"}
{"thread":"main","reason":{},"p":{},"level":"warn","message":"Unhandled
Rejection.","timestamp":"2021-05-18T14:42:29.376Z"}
{"thread":"main","level":"error","stack":"TypeError: Converting circular structure to JSON\n -->
starting at object with constructor 'Error'\n --- property 'error' closes the circle\n at JSON.stringify
(<anonymous>)\n at Printf.template (%%appPath%%/main/_helpers/localLogger.js:1:2390)\n at
Printf.transform (%%appPath%%/node_modules/logform/printf.js:11:26)\n at Format.transform
(%%appPath%%/node_modules/logform/combine.js:20:24)\n at Console._write
(%%appPath%%/node_modules/winston-transport/index.js:90:33)\n at doWrite
(%%appPath%%/node_modules/readable-stream/lib/_stream_writable.js:428:64)\n at
writeOrBuffer (%%appPath%%/node_modules/readable-stream/lib/_stream_writable.js:417:5)\n at
Console.Writable.write (%%appPath%%/node_modules/readable-
stream/lib/_stream_writable.js:334:11)\n at DerivedLogger.ondata
(%%appPath%%/node_modules/winston/node_modules/readable-
stream/lib/_stream_readable.js:662:20)\n at DerivedLogger.emit
(events.js:327:22)","message":"Converting circular structure to JSON\n --> starting at object with
constructor 'Error'\n --- property 'error' closes the circle","timestamp":"2021-05-18T14:42:29.387Z"}
{"thread":"main","class":"HostsFileService","level":"info","message":"Updating hosts
with","timestamp":"2021-05-18T14:42:29.418Z"}
{"thread":"main","class":"DeleteSiteService","message":"Deleting
%%site.runData%%","level":"info","timestamp":"2021-05-18T14:42:30.457Z"}
{"thread":"main","reason":{},"p":{},"level":"warn","message":"Unhandled
Rejection.","timestamp":"2021-05-18T14:42:30.536Z"}
{"thread":"main","class":"HostsFileService","level":"info","message":"Updating hosts
with","timestamp":"2021-05-18T14:42:31.309Z"}
{"thread":"main","class":"HostsFileService","stdout":"Updating hosts file at /etc/hosts\nUpdated
hosts file at /etc/hosts\n","stderr":"","level":"info","message":"Updated hosts.","timestamp":"2021-05-
18T14:42:32.416Z"}
{"thread":"main","class":"HostsFileService","stdout":"Updating hosts file at /etc/hosts\nUpdated
hosts file at /etc/hosts\n","stderr":"","level":"info","message":"Updated hosts.","timestamp":"2021-05-
18T14:42:34.778Z"}
Also, I made sure that nothing is binding to port 80.
Here are some bits of interest:
- Since it is authenticating, you would think it had the permissions to write to the host file. But it is erroring out before it asks for write permissions.
- On my local system, I went ahead (not a good idea…cannot recommend…I really know what I am doing and I still probably shouldn’t have) and gave my user permission to edit the hosts file, so I can now edit it without using sudo…meaning that Local should be able to write to my hosts file witthout permissions anyway now.