Warning! Missing host entry (macOS Monterey)

Issue Summary

I recently updated my iMac to macOS Monterey and tried creating a new site which comes up with an error message (Warning! Missing host entry. This site may be inaccessible.

Troubleshooting Questions

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

    • No, just the new site I created after the upgrade.
  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?

    • When I create the site it comes up with an error

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?

    • Version 6.1.8+5621
  • What Operating System (OS) and OS version is being used?

    • macOS Monterey version 12.1
  • 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.

Did you get this fixed? Been holding off Monterey until Iā€™m sure Local behaves.

No, I havenā€™t got it fixed yet and no one seems to help with this.

So strange. I know itā€™s free but stuff like ignoring legitimate issues creates bad feelings.
There were LOADS of upgrade issues a couple of years ago but that was all in Local. OS updates are long-betaā€™d and could be dealt with.
I hope you get to the bottom of it. Iā€™ll be sticking with BigSur for a while longer.

Yeah, they seem to be focusing more on Windows platforms hence makes me wonder why is the application multi-platform if they are unable to support its users.

Due to this, Iā€™m seriously having issues uploading the local site to a live WordPress site, as there seems to be an error code when uploading the site.

Hence want to use windows to see if the issue will be resolved.

Thereā€™s no way Iā€™m shifting to Windows but interested to see what happens.
Let me know how it goes.
Iā€™d be happy to try and help if youā€™re happy to send me a link to site backup. I can try and upload it to one of my servers.
Just rememberedā€¦
A while ago I had some Local problems. I zipā€™d the site then loaded it as a new site in Local. Problem vanished. Canā€™t remember what it was but might be worth a try.

For context, Iā€™m using Local 6.2.1 on an M1 MBA running Monterey 12.2 without any issues.

I didnā€™t want this to be another ā€œworks on my machineā€ butā€¦

Great but this is more about the ignorance of the ā€˜supportā€™ than how well your, or my, system is running.

Hi @Gchaniel,

Can you share a screenshot of the error youā€™re seeing? Typically, I believe that error comes with a ā€œFix Itā€ button that can be used to correct the issue Local has run into. I donā€™t believe this is related to any known issues in Local v6.1.8, but I would recommend trying on our latest release, Local v6.2.1, to see if this still occurs.

One possible issue - your log file makes me believe that Local might not be getting permissions to edit the hosts file. See this line:
ā€œ{ā€œthreadā€:ā€œmainā€,ā€œclassā€:ā€œHostsFileServiceā€,ā€œerrorā€:{},ā€œstdoutā€:{},ā€œstderrā€:{},ā€œexitCodeā€:{},ā€œlevelā€:ā€œerrorā€,ā€œmessageā€:ā€œCould not update hosts.ā€,ā€œtimestampā€:ā€œ2021-12-29T22:45:04.026Zā€}ā€. Iā€™m wondering if there is a permissions modal that pops up when creating the site.

Same as AFragen, I always hate to say it, but I am not seeing this issue on my Local instance running Local v6.2.1 on MacOS Monterey 12.2.

Hi @paulzz3000,

The Local team has updated our machines to Monterey, along with many others in the community, and Local is working great. Iā€™d encourage you to try it and let us know if you see any issues, but it has been tested. If youā€™re having an issue, Iā€™d be happy to dig in.

I apologize that it took us longer than I would have liked to get a response to this issue, but weā€™ve been chasing down a few issues impacting large numbers of users - not the best response, but the honest one. The Local team is smaller than youā€™d think, and getting to every issue in here is tough. I appreciate you stepping in and trying to lend the OP a hand; all of the help we get from the Local community is appreciated!

Hello @austinwendt Thanks for the response and yes the warning error comes with a ā€œFix itā€ button but that doesnā€™t do anything at all.

There is also no permission modal that pops up when creating the site, so since @afragen said he has no issues with his one, then probably might be issue with my iMac.

Please find below screenshots.


@austinwendt When I click the ā€œFix itā€ button, it comes up with the error message as attached.

So Iā€™m not sure if this is from my iMac, as this started when I updated to macOS Monterey and by the way my iMac runs on intel and not M1 chip

Here is my log file as well
local-lightning.log (33.5 KB)

What are the results of ls -la /etc/hosts?

This is mine.

āžœ  AJF-M1-MBA arm64: ~ ls -la /etc/hosts
-rw-r--r--@ 1 root  wheel  4869 Feb  5 12:23 /etc/hosts

This is mine
crutvea@iMac: ~ % ls -la /etc/hosts
-rw-rw-rw-@ 1 root wheel 1868 6 Jan 14:36 /etc/hosts

Hi @austinwendt, sure, thank you. Thatā€™s good to know.
I think Local is fantastic and have had no problems for a couple of yearsā€”there were a load of issues with every update but not had one for a long while.
Upgrading to Monterey and finding an problem with Local would be a huge pain in my butt but (!) your words have somewhat reassured me. :nerd_face:

1 Like

The permissions are a little different, it seems like mine are more restrictive. I guess thatā€™s not it. :thinking:

That is interesting; I agree that it looks like the permissions on your hosts file look correct, Local should be able to write. I am wondering if another program/anti-virus is somehow stopping Local from writing to that file.

As a potential workaround (short-term), have you tried using Local in localhost routing mode? This wonā€™t support HTTPS, but could resolve the issue with the site not working. If you go to Preferences > Advanced and change Router Mode to ā€œlocalhostā€, are you able to open sites as youā€™d expect?

Iā€™m having this same issue.

% ls -la /etc/hosts
-rw-rā€“rā€“+ 1 root wheel 6225 Feb 15 20:51 /etc/hosts

Is thre a fix? Anyone figure this out?

I may just uninstall.

By the way, it was working just a few weeks ago. Since then I updated to the newest version.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.