'site domains' setting not working on M1 Macbook Pro

Issue Summary

After a week of emails w/flywheel support and no fix, they sent me here. Someone please help…

I was working on a website on local by flywheel on an older mac with no problems, but now I’m using a newer mac…local will no longer connect to the ‘site domains’ setting in router mode. I’m running a 2020 Macbook Pro M1 on Big Sur OS.

I’ve looked up articles and tried some of the troubleshooting that was recommended (clicked on ‘always trust’ on keychain access, etc). I’ve also set the read/write privileges on my Local folder to be authorized. I’ve tried rebooting, don’t know what else to do. I don’t want to rely on ‘localhost’ setting along, I want to be able to use HTTPS.

One or two sentence summary of the issue.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

System Details

  • Which version of Local is being used?

Mac OS Big Sur

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
  • Attach the Local Log. See this Community Forum post for instructions on how to do so:

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Can you go into more detail about what isn’t working? It sounds like you are wanting to use the “site domains” setting, but for some reason, Local is only allowing you to use the localhost Router Mode.

You probably already found this help doc, but it’s good to review the things outlined in it:

Basically, you’ll need to zero in on what “thing” is taking over port 80 and then stopping it so that Local can use that port. Because ever machine is a different environment with any number of different configurations or software installed, it’s hard to know exactly what is listening on that port, so the best thing to do is to try the various things in that help doc and let us know what you find out!

That’s right, I’m unable to access the ‘site domains’, and it just takes me to an error that 'Local’s router is having trouble starting".

I’ve tried the killing port 80 activity, and nothing was on my comptuer for that port…I’ve also manually set the SSL certifiicate to ‘always trust’…I’ve also made sure the folder that has my local folder for my website is set to ‘read/write’

I’ve never once had an issue with local until I started using my M1 macbook pro with Big Sur as the OS. It has to be connected to this right?

I mean, it’s possible that it’s related, but there are lots of users that are using Local on M1 macs with Big Sur installed.

It appears that there aren’te any Logs attached to this topic. Can you please provide your Local Log as well as the router Log? See this Community Forum post for instructions on how to get the Local log:

For the router log, open Local and select “Help > Reveal Local Router’s Logs” – this will open Finder where you can upload the router log for the community to take a look at!

local-lightning.log (468.1 KB)

A current log is attached here, hope you see something…I sent a log several days ago to someone else in support for Flywheel, and the only feedback I got was that I should make sure the local website folder had read/write persmissions. But it already had that…

One other thought - I used a 2011 macbook pro with High Sierra as my OS up until a few weeks ago, and this was the OS I used to download the Local by Flywheel program a year and a half ago. I purchased a 2020 M1 macbook pro with Big Sur two weeks ago, and I did a migration of files from the old laptop to the new laptop.

Is it possible I’m having issues because I’m running a version of Local that was based on a download meant for High Sierra? And I need to entirely delete my local program and download a newer version? If I did that would I lose my local folders with my wordpress site?

Haven’t heard back from my last post 3 days ago, did you see anything I can do from the log? And from reading my last post, would you recommend a completely new download of Local? Would that mess up my wordpress folders/content I’ve created that go through my current version of Local? Thanks

The Flywheel support agents likely were commenting on the permissions of the site folders due to lines like this within the Local log:

{"thread":"main","class":"Process","process":"nginx","level":"warn","message":"2021/11/12 22:13:58 [emerg] 36778#0: open() \"%%router.runPath%%/nginx/logs/error.log\" failed (13: Permission denied)","timestamp":"2021-11-13T04:13:58.608Z"}

This is a little tricky because it mentions the router.runPath which technically isn’t the WordPress site itself – it’s what Local uses to transform a human readable name like mysite.local to the actual port that is being listened on, for example localhost:10004.

You mentioned that things were transferred from a different laptop to this one, I’m guessing using an automated tool of some sort. Where you usernames the same on both systems, or have they changed?

I would investigate the permissions on the configuration files for Local’s router and update those to your current user on the current machine. Since you’re on a Mac, those configuration files are located at:

~/Library/Application Support/Local/run/router

To transfer data from my old laptop to the new one, I used apple’s migration assistant. Migration assistant does a good job of transferring data/passwords but I’ve had issues with programs working like before (which is why I’m wondering if I should delete my version of local and start fresh). Username was the same from the old laptop to the new one.

I’m a noob at using terminal, but I put in my info like your screenshot and think I got the info to display correctly? I have both the ‘logs’ folder, and the ‘error.log’, but the permissions are different (‘logs’ is set to read/write to my username…but it looks like ‘error.log’ is set to read/write to root? When I right click the folder it says read/write is set to system, i guess that’s the same as root?).

As you can see in the terminal photo, multiple files and folders under the nginx are set to root…do I need to change all those files/folders to set to my personal username? Please review my photos and let me know. Thanks



Also, the bigger folder ‘router’ has read/write permissions set for me (a pic shows that). But like I said in the previous post, multiple files inside of the ‘router’ folder have permissions for system instead of me. Thanks and let me know!

Sorry last one before I get a reply back - under the ‘nginx’ folder there’s multiple subfolders that I don’t have permission to, that are read/write set to ‘system’. When I click them I get the error message in the pics.

Do I need to change permissions for all these files/folders? If so how do I do that if I don’t have permission to open them?


Nice! Thanks for those detailed screenshots!

I think that those files/folders being owned by root are the issue. You should be able to fix those permissions by deleting that folder and then letting Local re-create it. To do this in the terminal (likely the easiest way to do it) start with quitting Local and opening terminal.

Within the terminal, run this command to delete that router configuration folder:

sudo rm -r ~/Library/Application\ Support/Local/run/router

This will prompt you for your MacOS user’s password since you’re trying to delete files owned by root. Once that’s done, start Local and start a site which should re-create that router configuration folder. Let me know how that goes, or if you run into any other issues!

Ok just double checking before I do this later tonight - this won’t delete my wordpress content of the local site I’m working on? And do I need to ‘add a site’ to re-create the router folder? Or will re-opening my Local Site I’ve been working on be good enough to re-create the router configuration folder?

Making a backup of the site isn’t a bad idea, but running that command shouldn’t delete any of the site data.

After running that command in the terminal, you shouldn’t need to do anything else to get the router back except for start the site in Local. The only additional thing you might have to do is re-trust the site’s SSL certificate if you had enabled HTTPS at one point.

That fixed it! Thanks so much, I’ve been trying for weeks to get that fixed. Take care

1 Like

:larry_heart:

Nice! I’m glad you got it working!

Happy dev’ing!

Ok sorry one more issue…like I said in the last post, I got the ‘site domains’ to work as a direct link from the local app (ie when I click ‘admin’ or ‘open site’ in Local it works like normal now).

But, when I run ‘npm run watch-bs’ from VS Code (editor I’m using to edit my site that’s run by Local), it’s taking me to an error screen (I have a photo attached).

I have my Local log attached, and I’ll copy/paste what I put in my terminal to bring me to my error. Do you have any idea what happened?
local-lightning.log (498.3 KB)

MacBook-Pro-2020-M1:SpencerSounds-understrap-child chris$ npm run watch-bs

> understrap-child@1.0.1 watch-bs /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> npm-run-all --parallel bs watch-run-*


> understrap-child@1.0.1 bs /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> browser-sync start --config src/build/browser-sync.config.js


> understrap-child@1.0.1 watch-run-css /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> nodemon --watch sass/ --ext scss --exec "npm-run-all css"


> understrap-child@1.0.1 watch-run-js /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> nodemon --watch src/js/ --ext js --exec "npm-run-all js"

[nodemon] 2.0.13
[nodemon] 2.0.13
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): src/js/**/*
[nodemon] watching extensions: js
[nodemon] starting `npm-run-all js`
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): sass/**/*
[nodemon] watching extensions: scss
[nodemon] starting `npm-run-all css`
[Browsersync] Proxying: http://localhost
[Browsersync] Access URLs:
 ---------------------------------------
       Local: http://localhost:3000
    External: http://172.16.225.122:3000
 ---------------------------------------
          UI: http://localhost:3001
 UI External: http://localhost:3001
 ---------------------------------------
[Browsersync] Watching files...

> understrap-child@1.0.1 css /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> npm-run-all css-compile css-postcss css-minify


> understrap-child@1.0.1 js /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> npm-run-all js-compile js-minify


> understrap-child@1.0.1 js-compile /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> rollup --config src/build/rollup.config.js --sourcemap


> understrap-child@1.0.1 css-compile /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> sass --style expanded --source-map --embed-sources --no-error-css --quiet src/sass/child-theme.scss:css/child-theme.css src/sass/custom-editor-style.scss:css/custom-editor-style.css


/Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child/src/js/bootstrap.js, /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child/src/js/skip-link-focus-fix.js, /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child/src/js/custom-javascript.js → js/child-theme.js...
created js/child-theme.js in 810ms

> understrap-child@1.0.1 js-minify /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> terser --config-file src/build/terser.config.json --output js/child-theme.min.js js/child-theme.js

[nodemon] clean exit - waiting for changes before restart

> understrap-child@1.0.1 css-postcss /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> postcss --config src/build/postcss.config.js --replace "css/*.css" "!css/*.rtl*.css" "!css/*.min.css"

[Browsersync] Reloading Browsers...

> understrap-child@1.0.1 css-minify /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output css/ --batch --batch-suffix ".min" "css/*.css" "!css/*.min.css" "!css/*rtl*.css"

WARNING: Skipping remote @import of "https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" as no callback given.
[nodemon] clean exit - waiting for changes before restart
[Browsersync] File event [change] : css/child-theme.min.css
[Browsersync] File event [change] : css/custom-editor-style.min.css


 Session contents restored from 11/18/2021 at 1:47:55 PM 


The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
MacBook-Pro-2020-M1:SpencerSounds-understrap-child chris$ npm run watch-bs

> understrap-child@1.0.1 watch-bs /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> npm-run-all --parallel bs watch-run-*


> understrap-child@1.0.1 bs /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> browser-sync start --config src/build/browser-sync.config.js


> understrap-child@1.0.1 watch-run-css /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> nodemon --watch sass/ --ext scss --exec "npm-run-all css"


> understrap-child@1.0.1 watch-run-js /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> nodemon --watch src/js/ --ext js --exec "npm-run-all js"

[nodemon] 2.0.13
[nodemon] 2.0.13
[nodemon] to restart at any time, enter `rs`
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): sass/**/*
[nodemon] watching extensions: scss
[nodemon] watching path(s): src/js/**/*
[nodemon] watching extensions: js
[nodemon] starting `npm-run-all css`
[nodemon] starting `npm-run-all js`
[Browsersync] Proxying: http://localhost
[Browsersync] Access URLs:
 ---------------------------------------
       Local: http://localhost:3000
    External: http://172.16.225.122:3000
 ---------------------------------------
          UI: http://localhost:3001
 UI External: http://localhost:3001
 ---------------------------------------
[Browsersync] Watching files...

> understrap-child@1.0.1 css /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> npm-run-all css-compile css-postcss css-minify


> understrap-child@1.0.1 js /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> npm-run-all js-compile js-minify


> understrap-child@1.0.1 css-compile /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> sass --style expanded --source-map --embed-sources --no-error-css --quiet src/sass/child-theme.scss:css/child-theme.css src/sass/custom-editor-style.scss:css/custom-editor-style.css


> understrap-child@1.0.1 js-compile /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> rollup --config src/build/rollup.config.js --sourcemap


/Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child/src/js/bootstrap.js, /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child/src/js/skip-link-focus-fix.js, /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child/src/js/custom-javascript.js → js/child-theme.js...
created js/child-theme.js in 790ms

> understrap-child@1.0.1 js-minify /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> terser --config-file src/build/terser.config.json --output js/child-theme.min.js js/child-theme.js

[nodemon] clean exit - waiting for changes before restart

> understrap-child@1.0.1 css-postcss /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> postcss --config src/build/postcss.config.js --replace "css/*.css" "!css/*.rtl*.css" "!css/*.min.css"

[Browsersync] Reloading Browsers...

> understrap-child@1.0.1 css-minify /Users/chris/Local Sites/spencersoundscom/app/public/wp-content/themes/SpencerSounds-understrap-child
> cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output css/ --batch --batch-suffix ".min" "css/*.css" "!css/*.min.css" "!css/*rtl*.css"

WARNING: Skipping remote @import of "https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap" as no callback given.
[nodemon] clean exit - waiting for changes before restart
[Browsersync] File event [change] : css/child-theme.min.css
[Browsersync] File event [change] : css/custom-editor-style.min.css

Just checking, do you have any idea what’s causing this issue?