MacOS – Chrome is very slow due to “Resolving host in proxy script…”

google-chromemacosNetworkPROXY

I'm using a proxy script to connect to the Internet. I've set it, system wide, in :

System preferences -> Network -> Advanced... ->Proxies -> Automatic Proxy Configuration

and it works well.

I've also set it in Firefox

Preferences... -> Advanced -> Network -> Connection -> Settings -> Automatic Proxy Configuration URL

and it works well too.

In Safari, which use the system proxy configuration everything works well.

BUT in chrome Version 54.0.2840.87 (64-bit), which should use also the system proxy configuration everything is very slow and I always see, in the status bar, the message :

Resolving host in proxy script...

I've found the following thread about Proxy Pac and Sierra but it doesn't help.

Any idea?

P.S. I'm using macOS 10.12.1

Best Answer

I was experiencing this issue while using a corporate VPN from Chrome on a Mac. I resolved it by:

  1. Getting the full hostname from running the command hostname
  2. Opening up /etc/hosts in an editor, with write permissions, e.g. sudo vi /etc/hosts
  3. Adding the name of the machine to localhost, e.g.

    127.0.0.1   localhost Eamons-MacBook-Pro.local
    
  4. Saving /etc/hosts

Caveat: It is possible that /etc/hosts may be updated by the system during reboots and upgrades, and changes could be lost.