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

Can't override default remote-debugging-port using ChromeHeadless #187

Closed
yevit opened this issue Oct 10, 2018 · 0 comments
Closed

Can't override default remote-debugging-port using ChromeHeadless #187

yevit opened this issue Oct 10, 2018 · 0 comments

Comments

@yevit
Copy link

yevit commented Oct 10, 2018

I'm unable to set the remote debugging port when using ChromeHeadless, it always sticks to the default port 9222.

I'm using the following karma config:

...
customLaunchers: {
     ChromeHeadlessDebugging: {
          base: 'ChromeHeadless',
          flags: [
                 '--remote-debugging-port=9333'
          ]
     }
}

When this is used the argument for port 9333 is ignored and 9222 is used.

I've done a bit of investigation and believe that it is due to the way the arguments are concatenated on or around this line https://github.com/karma-runner/karma-chrome-launcher/blob/master/index.js#L168. This makes the aruments array look like this:

[ '--user-data-dir=C:\\Users\\####\\AppData\\Local\\Temp\\karma-84831659',
  '--no-default-browser-check',
  '--no-first-run',
  '--disable-default-apps',
  '--disable-popup-blocking',
  '--disable-translate',
  '--disable-background-timer-throttling',
  '--disable-renderer-backgrounding',
  '--disable-device-discovery-notifications',
  '--remote-debugging-port=9333',
  'http://localhost:9876/?id=84831659',
  '--headless',
  '--disable-gpu',
  '--remote-debugging-port=9222' ]

I'm guessing the issue is because of ordering of the arguments in the array and the ones in the karma config should be at the bottom?

rogeriopvl added a commit that referenced this issue Nov 19, 2018
This allows the --remote-debugging-port flag to be overridden with a
custom port when using chrome headless.

Fixes #187
rogeriopvl added a commit that referenced this issue Nov 20, 2018
This allows the --remote-debugging-port flag to be overridden with a
custom port when using chrome headless.

Fixes #187
rogeriopvl added a commit that referenced this issue Nov 20, 2018
This allows the --remote-debugging-port flag to be overridden with a
custom port when using chrome headless.

Fixes #187
dignifiedquire pushed a commit that referenced this issue Nov 20, 2018
This allows the --remote-debugging-port flag to be overridden with a custom port when using chrome headless.

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

No branches or pull requests

2 participants