Karma: cannot start chrome
See original GitHub issueFor my angularjs project, trying to use karma+jamine for unit testing. I have installed karma @ local and trying to start from .bin folder. So i’m getting following issue; FYI I’m pasting folder structure along with,
ERROR,
C:\Workspace\node_modules\.bin>karma start ../../karma.conf.js
27 10 2015 09:57:06.461:WARN [karma]: No captured browser, open http://localhost:9876/
27 10 2015 09:57:06.486:INFO [karma]: Karma v0.13.11 server started at http://localhost:9876/
27 10 2015 09:57:06.500:INFO [launcher]: Starting browser Chrome
27 10 2015 09:57:07.111:ERROR [launcher]: Cannot start Chrome
27 10 2015 09:57:07.119:INFO [launcher]: Trying to start Chrome again (1/2).
27 10 2015 09:57:07.491:ERROR [launcher]: Cannot start Chrome
27 10 2015 09:57:07.493:INFO [launcher]: Trying to start Chrome again (2/2).
27 10 2015 09:57:08.234:ERROR [launcher]: Cannot start Chrome
27 10 2015 09:57:08.236:ERROR [launcher]: Chrome failed 2 times (cannot start).Giving up.
27 10 2015 09:57:08.633:INFO [Chrome 46.0.2490 (Windows 7 0.0.0)]: Connected on
socket PgWwwQDh6BZ7k9fpAAAA with id 74171654
27 10 2015 09:57:18.954:WARN [Chrome 46.0.2490 (Windows 7 0.0.0)]: Disconnected
(1 times), because no message in 10000 ms.
27 10 2015 09:57:18.957:ERROR [karma]: [TypeError: Cannot read property 'map' of
undefined]TypeError: Cannot read property 'map' of undefined at _render (C:\Workspace\node_modules\karma\lib\reporters\progress.js:51:26)
at _refresh (C:\Workspace\node_modules\karma\lib\reporters\progress.js:55:34)
at onBrowserComplete (C:\Workspace\node_modules\karma\lib\reporters\prog
ress.js:15:21)
at null.<anonymous> (C:\Workspace\node_modules\karma\lib\events.js:13:22
)
at emitOne (events.js:82:20)
at emit (events.js:169:7)
at null._onTimeout (C:\Workspace\node_modules\karma\lib\browser.js:50:15
)
at Timer.listOnTimeout (timers.js:89:15)
Folder Structure,
node_modules
src
test
karma.conf
package.json
karma.conf
module.exports = function(config) {
config.set({
frameworks: ['jasmine'],
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine',
'karma-coverage',
'karma-chrome-launcher' ,
'karma-firefox-launcher',
'karma-requirejs',
'karma-ie-launcher'
],
files: [
'src/assets/js/angular.js',
'src/assets/js/angular-mocks.js',
'src/app/**/*.js',
'test/*.js'
],
preprocessors: {
'src/app/**/*.js': ['coverage']
},
reporters: ['progress','coverage'],
coverageReporter: {
type: 'html',
dir: 'coverage'
},
logLevel: config.LOG_INFO,
browsers: ['Chrome'],
singleRun: false
});
};
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Karma - Chrome failed 2 times (cannot start). Giving up
Solved that issue for me and karma started to launch chrome. ... The reason of error is that Chrome doesn't support no-sandbox anymore....
Read more >Fixing a Karma Issue With Chrome V93 | by Colton - Medium
We could work around this problem by using the browsers: ['ChromeHeadless'] in the Karma config file. Headless Chrome is a way to run...
Read more >Jenkins + karma + Chrome not working after last update
Karma does still work when run on the machine itself, but since the update karma cannot capture chrome if kicked off by jenkins...
Read more >karma-runner/karma - Gitter
Basically, I'm trying to run my chrome-headless tests in docker, using drone.io for it. ... [karma]: { Error: Cannot find module 'browserify' at...
Read more >63. Install Puppeteer for adding Chrome Headless ... - YouTube
... how to install Puppeteer for adding the chrome headless browser for automating the Karma Testing ... Your browser can't play this video....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just came across this bug as well. Weirdly enough, this started happening once I turned
autoWatch
tofalse
.Here’s my config:
@wvicioso @Dok11 we fixed javascript exception in karma
It doesn’t fix the reason why Chrome doesn’t start because in 90% it’s environment problem or problem in karma-chrome-launcher. Did you run karma with log level equals debug?