Missing hosts entry + hosts file locked

Issue Summary

I created a site in Local, but I have a warning message : ‘Missing Hosts entry’. When I click on ‘Fix it’, I have a pop-up message : Uh-oh! Local ran into a problem when trying to update the hosts file. Please ensure that the hosts file is not locked by anti-virus.
I have unsintall local and reinstall it as a administrator.
I checked all the posts around hat subject.
I disabled my anti-virus and tried to fix the issue.
I included the line ‘ example.local’ in the hosts file.
Nothing works!! :unamused: :sob:
Here are the logs of local.local-lightning.log (94.7 KB)

System Details

I am on windows 10 with McAfee.

It will be wonderful if you could help solving this issue!!! And I will be able to use this software how looks so interesting!
Have a great day.

1 Like

Having the same problem, did you get this issue resolved?

1 Like

Hey @DomiRen and @Devdude6, Welcome to the forums!

Thanks for including the Local log @DomiRen! I’m seeing a line that looks like this:

{"thread":"main","class":"HostsFileService","error":{"code":1},"stdout":{},"stderr":{},"exitCode":1,"level":"error","message":"Could not update hosts.","timestamp":"2021-03-15T13:39:52.863Z"}

Which still seems to indicate that the hosts file is locked. Can you take a look at this FAQ in the forums to see if it get you pointed in the right direction?

That linked FAQ mentions Kaspersky, but the general idea should be the same for other Antivirus software as well.

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