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.

"WARN [karma]: No captured browser" message always appears

See original GitHub issue

Expected behaviour

Should not see any warnings when starting karma

Actual behaviour

The following output appears after i run karma start

21 09 2016 18:28:21.960:WARN [karma]: No captured browser, open http://localhost:9876/
21 09 2016 18:28:21.970:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
21 09 2016 18:28:21.970:INFO [launcher]: Launching browser Chrome with unlimited concurrency
21 09 2016 18:28:21.992:INFO [launcher]: Starting browser Chrome
21 09 2016 18:28:22.881:INFO [Chrome 53.0.2785 (Linux 0.0.0)]: Connected on socket /#OLx2oK-yFrqokDyYAAAA with id 52089739

Environment Details

  • Karma version (output of karma --version): 1.3.0
  • Relevant part of your karma.config.js file:
// Karma configuration
// Generated on Wed Sep 21 2016 18:16:01 GMT+0100 (BST)

module.exports = function(config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine'],
    files: [
      '*.js'
    ],
    exclude: [
    ],
    preprocessors: {
    },
    reporters: ['progress'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false,
    concurrency: Infinity
  })
}

Steps to reproduce the behaviour

  1. create a new project, set up package.json with :

    "devDependencies": {
      "jasmine-core": "^2.5.2",
      "karma": "^1.3.0",
      "karma-chrome-launcher": "^2.0.0",
      "karma-jasmine": "^1.0.2"
    }
    
  2. use the above karma.conf.js

  3. create a dummy js file so karma has something to load (eg. test.js)

  4. run karma start, and you should see a warning

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:27
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

22reactions
aleksspeakercommented, Apr 12, 2018

Hey guys, Any updates on this issue?

12reactions
johnjbartoncommented, Mar 23, 2020

3.5 years and still no solution?

karma has worked fine for millions of tests over those 3.5 years. So perhaps there never was a problem here?

The “No captured browser” means karma can’t automatically test because it does not have a browser to launch tests in. I speculated on the cause, a deliberate config issue, above. Without further information there is nothing to do here.

I suggest opening a new issue with a complete description from a recent karma version and the output of --logLevel=DEBUG.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma not running unit tests due to "No captured browser ...
This error can mean that the browser can't find the server. Check if you can reach the server at ...
Read more >
Karma: make it possible to capture browser manually - YouTrack
Open these browsers manually, enter URL for capturing (http://localhost:9876/) - browsers shown with connected Karma server message, but no tests are still ...
Read more >
karma-runner/karma - Gitter
It seems the “close the browsers” feature is directly tied to singleRun mode, ... karma.conf.js 30 03 2016 17:53:01.009:WARN [karma]: No captured browser, ......
Read more >
Angularjs – get a 404 message from Karma webserver – iTecNote
But I'm getting a 404 warning for jspm_packages , see screenshot below. My test is not running because it will always fail. My...
Read more >
an error was thrown in afterall error: expected false to be true.
HigherIncreases the frequency the app appears ... 09 03 2021 08:46:44.644:WARN [karma]: No captured browser, ... + 916 hidden modules WARNING in ...
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