Karma: Headless Chrome version detected to be 0.0.0

Created on 7 Jul 2017  路  3Comments  路  Source: karma-runner/karma

Expected behaviour

Karma should display a real version number of Chrome Headless.

Actual behaviour

It always displays HeadlessChrome 0.0.0 (Mac OS X 10.12.5).

Environment Details

  • Karma version (output of karma --version):
    1.7.0
  • Relevant part of your karma.config.js file
        browsers: ['ChromeHeadless'],

Steps to reproduce the behaviour

  1. Specify browsers: ['ChromeHeadless'] in the Karma config.
  2. Run any tests.
  3. Look at the terminal.

User agent of Chrome Headless contains HeadlessChrome instead of Chrome; I expect some user agent parsing is failing here. An example user agent of Chrome 59 headless on macOS Sierra:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/59.0.3071.115 Safari/537.36

Most helpful comment

All 3 comments

The upstream PR is resolved. I confirmed locally that upgrading useragent from 2.2.1 to 2.3.0 in the Karma package.json fixes this problem. Shall I open a PR for that version bump?

yes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielsiwiec picture danielsiwiec  路  5Comments

joerideg picture joerideg  路  5Comments

TKTheTechie picture TKTheTechie  路  4Comments

VinishaDsouza picture VinishaDsouza  路  3Comments

HerrDerb picture HerrDerb  路  5Comments