Troubleshooting 4 min read

ERR_TUNNEL_CONNECTION_FAILED: What It Means and How to Fix It

Chrome reached the proxy, asked for a tunnel, and got a no. The status code behind that no tells you exactly what to fix.

ERR_TUNNEL_CONNECTION_FAILED means Chrome connected to the proxy server, asked it to open a tunnel to an HTTPS website with a CONNECT request, and the proxy didn't return "200 Connection established". The proxy is reachable, so this isn't a network or address problem. Something in the CONNECT exchange failed: authentication, the plan, the target, or the protocol. Chrome hides the proxy's actual response, so the fastest fix is to reproduce the request outside Chrome and read it.

See the Real CONNECT Response

Run the same request with curl in verbose mode, using exactly the credentials and port configured in Chrome:

curl -v -x http://USERNAME:[email protected]:8080 https://example.com -o /dev/null 2>&1 | grep -E "CONNECT|^< HTTP|curl:"

The line after > CONNECT is the answer Chrome got. Here's how to read it:

  • 407 Proxy Authentication Required: wrong username or password, or the plan isn't active. Chrome normally shows a login prompt for this, but if saved credentials are wrong or an extension supplies bad ones, you get the tunnel error instead.
  • 402: the plan has run out of bandwidth. The credentials are fine; top up the plan.
  • 502 or 503: authentication passed, but the proxy couldn't reach the target through the chosen exit. Usually transient; retry or try another country.
  • No HTTP response and "Connection reset" or "Empty reply": you're probably talking to the wrong port or protocol.

Fix 1: Credentials Chrome Is Sending

Chrome caches proxy credentials for the session. If you changed your password, or typed it wrong once and saved it, Chrome keeps sending the bad one. Close all Chrome windows completely (on macOS, Quit from the menu) and reopen so it prompts again. If an extension handles proxy authentication, update the credentials inside the extension.

Remember that targeting options go in the username, not the password. USERNAME-country-us is correct; adding -country-us to the password makes authentication fail. The proxy username builder produces the right string.

Fix 2: Plan Status

On the NodeProxies gateway, 407 also appears when the plan behind the credentials isn't active, and 402 when it's out of bandwidth. Check the dashboard: if the plan shows zero remaining, add balance or buy more. Balance never expires, and plans can be as small as 100 MB.

Fix 3: Port and Protocol

Chrome's tunnel error is common when the configuration mixes up HTTP and SOCKS:

  • HTTP proxy settings must point to port 8080. Port 1080 is the SOCKS5 endpoint and won't understand CONNECT.
  • Chrome doesn't support SOCKS5 with username and password. For authenticated proxies in Chrome, use the HTTP endpoint. SOCKS5 vs. HTTP proxies explains why.
  • If you configured "Secure Web Proxy" on macOS or an https:// proxy in a PAC file, Chrome may try TLS to the proxy itself. Use plain HTTP to the proxy on 8080; your HTTPS traffic is still encrypted end to end inside the tunnel.

Fix 4: The Target Itself

If curl shows a 502 or 503 on CONNECT for one specific site but other sites work, the exits couldn't reach that site. Check whether the site is up without the proxy, and try different country targeting. Proxy error 502 Bad Gateway covers this case.

Fix 5: Something Else Is in the Middle

Corporate networks sometimes force all traffic through their own proxy, which then refuses CONNECT to unknown proxies or to non-standard ports. Antivirus web shields can do the same. If curl works from a different network (try a phone hotspot) but not from this one, the local network is blocking the tunnel. Talk to whoever runs it.

Fixing It in Automated Browsers

The same error appears in Playwright and Puppeteer as net::ERR_TUNNEL_CONNECTION_FAILED. In Playwright, pass credentials in the proxy object rather than in the server URL:

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({
    proxy: {
      server: 'http://global.nodeproxies.xyz:8080',
      username: 'USERNAME-country-us',
      password: 'PASSWORD',
    },
  });
  const page = await browser.newPage();
  await page.goto('https://api.ipify.org');
  console.log(await page.textContent('body'));
  await browser.close();
})();

In Puppeteer, use --proxy-server=http://global.nodeproxies.xyz:8080 as a launch argument and call page.authenticate({ username, password }) before the first navigation. Forgetting authenticate is the most common cause of tunnel errors there. More examples are in proxies with Node.js, Axios and Puppeteer.

Getting a Working Tunnel with NodeProxies

Use global.nodeproxies.xyz:8080 as an HTTP proxy, put options in the username, and confirm with curl before configuring the browser. If you need credentials, create an account and pick a plan on the pricing page.

FAQ

What is the difference between ERR_TUNNEL_CONNECTION_FAILED and ERR_PROXY_CONNECTION_FAILED?

ERR_PROXY_CONNECTION_FAILED means Chrome couldn't reach the proxy at all. ERR_TUNNEL_CONNECTION_FAILED means it reached the proxy, but the proxy didn't open the tunnel. See ERR_PROXY_CONNECTION_FAILED for the first one.

Why does ERR_TUNNEL_CONNECTION_FAILED only happen on HTTPS sites?

Tunnels (CONNECT) are only used for HTTPS. Plain HTTP pages are fetched by the proxy directly, so a different failure path applies.

Can a wrong password cause ERR_TUNNEL_CONNECTION_FAILED?

Yes. If Chrome or an extension sends saved but wrong credentials, the proxy answers 407 and Chrome may report it as a tunnel failure. Restart Chrome to clear cached credentials.

NodeProxies

Ready to get started?

90M+ residential, mobile & datacenter proxies. Datacenter from $0.30/GB, residential from $0.42/GB. No contracts.

Create free account