New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776995 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

All Non-Cached Requests Delayed in Headless Mode

Reported by gibs...@gmail.com, Oct 20 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Launch headless browser with remote debugging.
2. Use remote debugger to load a known website that will request JS/CSS/images.

What is the expected behavior?
All requests (up to limit) are made and occur immediately, no additional delays are observed between requests.

What went wrong?
Every request is delayed by 2.25 seconds * request sequence #. Hovering over details of any given request indicates it was delayed for "Proxy Negotiation", even if proxy is disabled by switch.
Example timeline with N requests:
T=0 - request page
T=~0 - page content retrieved
T=~2.25 - referenced file request #1 is executed
T=~4.50 - referenced file request #2 is executed
T=~6.75 - referenced file request #3 is executed
...
T=~2.25*N - last referenced file request is executed

Did this work before? N/A 

Chrome version: 62  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

I have tried many command line switches to try to avoid this problem, but nothing appears to make a difference. This makes the headless browser unusable for any of my use cases.
 
headless_chromium_issue.png
52.6 KB View Download
Components: -Platform>DevTools Internals>Headless
Cc: vamshi.k...@techmahindra.com
Labels: Triaged-ET TE-NeedsTriageHelp Needs-Triage-M62
Status: Available (was: Unconfirmed)
Which flag are you using to disable the proxy?

Could you record a performance trace as described here and attach to this bug?

https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference

Comment 4 by gibs...@gmail.com, Oct 27 2017

Using --no-proxy-server flag.

I cannot save a performance trace in headless mode to upload:
Saving files is not enabled in hosted mode. Please inspect using chrome://inspect

Comment 5 by gibs...@gmail.com, Dec 21 2017

After months of personal anguish, reviewing net logs and banging my head against tables I found that there was one environmental difference between a system I had that was working fine (without delay) and the systems I have that would have a 2.25 second delay on every request: Systems that misbehaved had Automatic proxy detection was enabled at the system level.

Disabling automatic proxy in the LAN tab in the "Connections" tab of the "Internet Properties" control panel (windows 7) resulted in good, quick, unblocked requests. 

Another workaround is to add the flag: --proxy-server="direct://" 

This means that specifying "--no-proxy-server" is not behaving as expected (expected: don't use a proxy no matter what, actual: queries operating system for proxy configuration), and that Chrome headless is also mis-handling proxy lookups (repeating lookups on every request, not maintaining the proxy settings detected from initial request).

I'm glad to have a workaround, and we can probably relate this issue to https://bugs.chromium.org/p/chromium/issues/detail?id=247461
Project Member

Comment 6 by sheriffbot@chromium.org, Dec 24

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment