What issue or error are you experiencing?
Hello!
I am struggling with a strange issue that I have worked very hard to troubleshoot. Sadly, my DuckDuck-Fu has failed me!
What’s happening is that, after installing Local and setting up a test site, I am getting persistent “Missing host entry. This site may be inaccessible” warnings and, after clicking Fix it in the warning, I am seeing the associated “Uh-oh! Could not update hosts file” error pop-up. I also see a “Host Redirection: Local is requesting administrative privileges to modify your /etc/hosts file” system notification, but I am not given a system authorization prompt and the hosts file is not updated.
Furthermore, if I manually update the hosts file (or ignore this issue) and attempt to Trust the test site’s SSL certificate, I am then faced with similar warnings/pop-ups and system notifications (“Local is requesting administrative privileges to trust a certificate.”) but, again, no authorization prompt and the cert isn’t added to my Keychain.
However…if I load up the same Local install with a fresh Mac user account (also an Admin account), everything works properly. I see the warnings and system notifications, but I am also presented with a prompt to enter my system account password. And then the host file is properly updated and the cert is properly added to my Keychain.
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
Simply adding a fresh site and attempting to start it (or Trust its SSL certificate) causes the issue on my Mac’s primary account (which is set to Admin). I have no anti-virus.
I suspect this problem is deeper than Local, but I haven’t had much luck finding others with similar issues. In addition to extensive searching, here and elsewhere, I’ve also:
- Dug through GitHub issues for other Electron apps, thinking the issue might have to do with node/Electron/Keychain
- Completely uninstalled Local a few times
- Updated Node and tried to install Local fresh with different Node versions (via nvm and per suggestions from this thread)
- Manually installed Rosetta2 via the command line
- Tried the Intel 8.2.1 version
- Updated my OS and XCode
- Tried in Safe Mode
- Reset Default Keychains in Keychain Access
- Manually give Full Disk Access & Accessibility permissions to Local
- Used tccutil to reset ALL of my permissions
System Details
-
Local Version: 8.2.1 ARM
-
Operating System (OS) and OS version: M1 Mac with Ventura 13.6.4
Local Logs
Attach your Local Logs here (Help Doc - Retrieving Local’s Log)
{"level":"info","message":"Finished maybeCopyBundledServices in 0.001s","thread":"main","timestamp":"2024-02-02T17:08:31.214Z"}
{"class":"AddonLoaderService","level":"info","message":"Loading Add-on: %%userDataPath%%/lightning-services/mailhog-1.0.0+3/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.215Z"}
{"class":"AddonLoaderService","level":"info","message":"Successfully Loaded Add-on: %%userDataPath%%/lightning-services/mailhog-1.0.0+3/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.216Z"}
{"class":"AddonLoaderService","level":"info","message":"Loading Add-on: %%userDataPath%%/lightning-services/mariadb-10.4.10+4/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.216Z"}
{"class":"AddonLoaderService","level":"info","message":"Successfully Loaded Add-on: %%userDataPath%%/lightning-services/mariadb-10.4.10+4/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.224Z"}
{"class":"AddonLoaderService","level":"info","message":"Loading Add-on: %%userDataPath%%/lightning-services/mysql-8.0.16+6/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.224Z"}
{"class":"AddonLoaderService","level":"info","message":"Successfully Loaded Add-on: %%userDataPath%%/lightning-services/mysql-8.0.16+6/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.230Z"}
{"class":"AddonLoaderService","level":"info","message":"Loading Add-on: %%userDataPath%%/lightning-services/nginx-1.16.0+7/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.231Z"}
{"class":"AddonLoaderService","level":"info","message":"Successfully Loaded Add-on: %%userDataPath%%/lightning-services/nginx-1.16.0+7/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.238Z"}
{"class":"AddonLoaderService","level":"info","message":"Loading Add-on: %%userDataPath%%/lightning-services/php-8.1.23+0/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.238Z"}
{"class":"AddonLoaderService","level":"info","message":"Successfully Loaded Add-on: %%userDataPath%%/lightning-services/php-8.1.23+0/lib/main.js","thread":"main","timestamp":"2024-02-02T17:08:31.244Z"}
{"class":"AddonLoaderService","level":"info","message":"Add-on does not have \"productName\" specified in package.json: %%appPath%%/node_modules/@getflywheel/local-components/package.json","thread":"main","timestamp":"2024-02-02T17:08:31.245Z"}
{"class":"AddonLoaderService","level":"info","message":"Add-on does not have \"productName\" specified in package.json: %%appPath%%/node_modules/@getflywheel/localcert/package.json","thread":"main","timestamp":"2024-02-02T17:08:31.245Z"}
{"class":"AddonLoaderService","level":"info","message":"Add-on does not have \"productName\" specified in package.json: %%appPath%%/node_modules/@getflywheel/localtunnel/package.json","thread":"main","timestamp":"2024-02-02T17:08:31.245Z"}
{"class":"AddonLoaderService","level":"info","message":"Add-on does not have \"main\" or \"renderer\" specified in package.json: %%appPath%%/node_modules/@getflywheel/replacestream/package.json","thread":"main","timestamp":"2024-02-02T17:08:31.245Z"}
{"class":"GraphQLService","level":"verbose","message":"GraphQL server ready at http://127.0.0.1:4000/graphql","thread":"main","timestamp":"2024-02-02T17:08:31.277Z"}
{"class":"GraphQLService","level":"verbose","message":"GraphQL subscriptions ready at ws://127.0.0.1:4000/graphql","thread":"main","timestamp":"2024-02-02T17:08:31.277Z"}
{"level":"warn","linuxEdition":null,"localVersion":"8.2.1+6583","message":"Electron Event ready","osArch":"arm64","osPlatform":"darwin","osRelease":"22.6.0","timestamp":"2024-02-02T17:08:31.319Z","windowsEdition":null}
{"class":"Updater","level":"info","message":"Checking for updates for: darwin-arm64-production","thread":"main","timestamp":"2024-02-02T17:08:31.347Z"}
{"class":"Updater","level":"debug","message":"Check for updates result","release":null,"thread":"main","timestamp":"2024-02-02T17:08:31.696Z"}
{"class":"HostsFileService","level":"debug","message":"maybeUpdate","sites":{"UDYGkuz5D":{"domain":"loctest1.local","environment":"flywheel","id":"UDYGkuz5D","localVersion":"8.2.1+6583","multiSite":"","mysql":{"database":"local","password":"[REDACTED]","user":"root"},"name":"loctest1","path":"~/Local Sites/loctest1","ports":{},"services":{"mailhog":{"name":"mailhog","ports":{"SMTP":[10001],"WEB":[10000]},"type":"lightning","version":"1.0.0"},"mysql":{"name":"mysql","ports":{"MYSQL":[10004]},"role":"db","type":"lightning","version":"8.0.16"},"nginx":{"name":"nginx","ports":{"HTTP":[10003]},"role":"http","type":"lightning","version":"1.16.0"},"php":{"name":"php","ports":{"cgi":[10002]},"role":"php","type":"lightning","version":"8.1.23"}},"workspace":null,"xdebugEnabled":false}},"thread":"main","timestamp":"2024-02-02T17:08:37.350Z"}
{"class":"HostsFileService","level":"debug","message":"Updating hosts","thread":"main","timestamp":"2024-02-02T17:08:37.351Z"}
{"class":"HostsFileService","level":"info","message":"Updating hosts with","thread":"main","timestamp":"2024-02-02T17:08:37.353Z"}
{"class":"HostsFileService","level":"debug","message":"Updating hosts with command","thread":"main","timestamp":"2024-02-02T17:08:37.353Z","updateCommand":"/Applications/Local.app/Contents/MacOS/Local","updateCommandArgs":["%%appPath%%/main/dns/workers/updateHostsFileWorker.js","loctest1.local","www.loctest1.local"]}
{"class":"HostsFileService","error":{},"exitCode":{},"level":"error","message":"Could not update hosts.","stderr":{},"stdout":{},"thread":"main","timestamp":"2024-02-02T17:08:37.678Z"}
{"class":"X509CertService","level":"debug","message":"security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain %%router.runPath%%/nginx/certs/loctest1.local.crt","thread":"main","timestamp":"2024-02-02T17:08:41.028Z"}
Any help would be greatly appreciated!
Thanks for your time,
Ryan