Issue metadata
Sign in to add a comment
|
--user-agent CLI argument ignored when running headless
Reported by
lawn...@gmail.com,
Jan 12 2017
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 Steps to reproduce the problem: 1. google-chrome-unstable --headless --remote-debugging-port=9222 --disable-gpu --user-agent='foo bar' http://www.whatsmyua.com/ 2. Navigate to localhost:9222 and click the link to start debugging remotely 3. Observe user agent displayed by website 4. Evaluate 'navigator.userAgent' in remote debugger console What is the expected behavior? The reported user agent should be 'foo bar' What went wrong? The user agent is reported as "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36" Did this work before? N/A Chrome version: 57.0.2970.0 Channel: dev OS Version: Ubuntu 16.04.1 LTS Flash Version: This works as expected without the `--headless` flag
,
Jan 16 2017
Getting 'Cannot start http server for devtools.Stop devtools' on Linux Ubuntu 14.04 on the reported version(57.0.2970.0) and the latest Dev(57.0.2979.0) when trying step-1. Attached is the screenshot of the terminal. However the same works fine on 57.0.2950.0 when running step #1 and user agent of the site is shown as foo bar. 57.0.2951.0 showed 'Illegal instruction core dumped' when executing test step #1. Considering below as the changelog: =================================== https://chromium.googlesource.com/chromium/src/+log/57.0.2950.0..57.0.2951.0?pretty=fuller&n=10000 skyostil@: Could this be related to runtime headless mode for Linux: https://codereview.chromium.org/1991953002. (CL was landed-reverted-again relanded). Please help in investigating this further. Thank you!
,
Jan 16 2017
,
Jan 26 2017
> Getting 'Cannot start http server for devtools.Stop devtools' on Linux Ubuntu 14.04 I reported this for 16.04.1. I did not attempt to repro this bug on 14.04.
,
Apr 4 2017
User agent overriding in Headless is exposed through DevTools: https://chromedevtools.github.io/debugger-protocol-viewer/tot/Network/#method-setUserAgentOverride
,
Apr 4 2017
Will this work when driving the headless browser via Selenium?
,
Apr 5 2017
#6: Yes, ChromeDriver is being changed to support this: https://codereview.chromium.org/2785083002/ (however it looks like we may need to support --user-agent after all) |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by alph@chromium.org
, Jan 14 2017Components: -Platform>DevTools