Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable proxy discovery in headless mode. #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alancnet
Copy link

@alancnet alancnet commented Sep 7, 2018

Corrects an issue where HeadlessChrome downloads scripts at a very slow rate. As demonstrated in the screenshot, when running headless, each script took several seconds to load, causing minutes of delay for a test run. This may not occur in all environments. Shown is Chromium 70.0.3508.0 on Windows 7 SP1.

Note: This does not occur if the --headless flag is removed, so this may be indicative of a bug in Chromium.

image

@alancnet
Copy link
Author

alancnet commented Sep 7, 2018

CI failure unrelated to PR:

The command "eval npm install  " failed. Retrying, 3 of 3.
/home/travis/.nvm/versions/node/v4.9.1/lib/node_modules/npm/bin/npm-cli.js:85
      let notifier = require('update-notifier')({pkg})
      ^^^
SyntaxError: Block-scoped declarations (let, const, function, class)
             not yet supported outside strict mode

@rogeriopvl
Copy link
Collaborator

@alancnet thanks for submitting this PR and sorry for the delay responding.

It's been a while since this PR was created. Can you confirm the issue still occurs?

@@ -165,7 +165,7 @@ ChromeBrowser.prototype = {
ChromeBrowser.$inject = ['baseBrowserDecorator', 'args']

function headlessGetOptions (url, args, parent) {
return parent.call(this, url, args).concat(['--headless', '--disable-gpu', '--remote-debugging-port=9222'])
return parent.call(this, url, args).concat(['--headless', '--disable-gpu', '--remote-debugging-port=9222', '--proxy-server="direct://"', '--proxy-bypass-list=*'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please refactor this line into multiple lines please?

@alancnet
Copy link
Author

@rogeriopvl Sorry for the delay. After Thanksgiving, I've been occupied in another project. I will revisit this as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants