question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having problems running karma with jenkins in chrome

See original GitHub issue

After chrome updated today it seems our builds no longer work. interactive shells seem to work, just not in jenkins 😦

chrome Version 52.0.2743.82 m OS: Windows Server 2012 r2

Running "karma:continuous" (karma) task
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [framework.browserify]: 2640391 bytes written (24.08 seconds)
INFO [framework.browserify]: bundle built
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start Chrome again (1/2).
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start Chrome again (2/2).
WARN [launcher]: Chrome have not captured in 60000 ms, killing.
ERROR [launcher]: Chrome failed 2 times (timeout). Giving up.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:44

github_iconTop GitHub Comments

43reactions
edgahancommented, Aug 1, 2016

I was running into the same issue with both e2e protractor tests and Karma unit tests. Windows jenkins specifically (running manually in cmd was working fine).

The (temp) fix was the same for both:

In karma.conf:

    browsers: ['ChromeNoSandbox'],

    customLaunchers: {
      ChromeNoSandbox: {
        base: 'Chrome',
        flags: ['--no-sandbox']
      }
    }

In protractor.conf

    browserName: 'chrome',
    chromeOptions: {
      args: ['--no-sandbox']
    }
  }

“karma-chrome-launcher”: “^1.0.1”, and “protractor”: “4.0.0”,

7reactions
binariouscommented, Sep 15, 2016

Same problem for me with the following setup:

browsers: [
  'ChromeNoSandbox'
],

customLaunchers: {
  ChromeNoSandbox: {
    base: 'Chrome',
    flags: ['--no-sandbox']
  }
},

karma-chrome-launcher: 2.0.0 karma: 1.3.0 chrome: 53.0.2785.116 os: CentOS 7

Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma Chrome Headless not working on Jenkins
Based on issue Karma 1.6 breaks Headless support for Chrome created on github, it is related to the slower machine and happens, ...
Read more >
Jenkins + karma + Chrome not working after last update
INFO [launcher]: Trying to start Chrome again (1/2). WARN [launcher]: Chrome have not captured in 60000 ms, killing. INFO [launcher]: Trying to start...
Read more >
Karma test with ChromeHeadless '--no-sandbox' issue
I'm trying to run Karma tests in Jenkins pipeline. I'm new to this topic, and to start, I pulled openui5-sample-app from Git repository....
Read more >
karma-runner - Bountysource
When launching the karma test with chrome already running, three karma tabs open, connect, lose the connection again and then karma crashes.
Read more >
Troubleshooting - Karma test runner
The --no-single-run option causes the server to print a URL and wait. Open the URL in a browser and use the browsers devtools...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found