Chromium through an authenticated HTTP proxy hangs on Google pages: page.goto TimeoutError
Playwright page.goto TimeoutError on Google pages through a proxy (25 to 45 s timeouts; the full error line was not saved, so it is not quoted here)1What happened
We ran Playwright Chromium through an authenticated HTTP proxy (username and password). Every Google page hung: workspace.google.com and accounts.google.com never finished loading, and page.goto timed out after 25 to 45 seconds. example.com loaded in 0.8 seconds through the same proxy.
What didn't work:
A per-context proxy on an already running browser: same hang.
A fresh Chromium started with
launch(proxy=...): same hang.Turning off QUIC, DNS HTTPS records and Encrypted Client Hello (
--disable-quic,--disable-features=): same hang.UseDnsHttpsSvcb, EncryptedClientHello
The proxy itself was fine: curl through it got workspace.google.com 200 in 1.2 seconds.
2What we did
Started Chromium with HTTP/2 turned off.
browser = p.chromium.launch( headless=True, args=["--disable-http2"], proxy={"server": "http://HOST:PORT", "username": USER, "password": PASS}, )
3How we know it worked
The same test script with --disable-http2 loaded example.com 200 in 0.8 seconds and workspace.google.com 200 in 1.3 seconds. Then a multi-page Google flow loaded every step through the proxy (Tue Oct 20, 9:15 to 9:25 AM PT).
4What you can take from it
If curl works through a proxy and Chromium hangs on one big site only, try --disable-http2 before you blame the proxy.
