Updating the Hosts File on Windows 10

Hey @jhakimbachi

I’ve added the Local log so others can take a look a the source. It looks like the main issue is related to lines like these:

Dec 17, 2018, 8:09 PM PST - error: [main/hosts-helper] Could not update hosts. 
{ stdout: '', stderr: '', error: null, exitCode: 101 }

On Windows terminals, the exitCode: 101 means:

The exclusive semaphore is owned by another process.

Basically, something is managing access to the Hosts file – or more specifically, is currently accessing and/or editing the file. It’s a good guess that it has something to do with Antivirus or a Firewall.

According to this SuperUser post:

Some solutions involved going to the settings of the various pieces of software and checking for something like “Lock Hosts File”. I would take a second look at the settings for those things and see if there is any option along those lines.

You might also try using Window’s “Resource Monitor” to identify what process is locking the file. This SuperUser answer has more details on how to do that: filesystems - Find out which process is locking a file or folder in Windows - Super User

Let me know if you have additional questions, or what ends up solving the issue!

– Ben