I have a Karma test suite that runs great in Firefox and Chrome 34. Chrome auto-upgraded to 35 and I'm getting this error after the tests have run:
WARN [Chrome 35.0.1916 (Mac OS X 10.9.2)]: Disconnected (1 times), because no message in 10000 ms.
Chrome 35.0.1916 (Mac OS X 10.9.2): Executed 712 of 712 DISCONNECTED (14.836 secs / 5.021 secs)
The tests all run and pass, but Chrome disconnecting causes the suite to fail.
We're running our tests from Grunt on OS X Mavericks.
Here's our config:
module.exports = function (config) {
config.set({
port: 9876,
captureTimeout: 60000,
frameworks: ['jasmine'],
basePath: 'app/build',
singleRun: true,
browsers: [
'Chrome',
'Firefox'
],
plugins: [
'karma-jasmine',
'karma-coverage',
'karma-story-reporter',
'karma-phantomjs-launcher',
'karma-firefox-launcher',
'karma-chrome-launcher'
],
files: [
// lots of files
],
exclude: [
'**/*.scenario.js'
],
reporters: ['coverage', 'dots'],
preprocessors: {
'!(bower_components)/**/!(*.spec).js': 'coverage'
},
coverageReporter: {
type: 'cobertura',
dir: '../coverage',
file: 'coverage.xml'
}
});
};
Please add a browserNoActivityTimeout in your karma.conf.js file. It is 10000 msec by default. I had a similar issue. Chrome seems to be taking some time to load and notify karma. I increased the timeout to 30000 and that solves it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With