How to run Karma with Chrome on TravisCI (Ubuntu 16.04/Xenial)? - karma-runner

My tests recently started failing on TravisCI because Google apparently dropped support for Ubuntu 14.04 (Trusty) with the latest release of Chrome. I've upgraded to Ubuntu 16.04 (Xenial) but am now unable to get Karma to connect to Chrome:
11 09 2019 18:15:05.421:INFO [karma-server]: Karma v3.1.4 server started at http://0.0.0.0:9876/
11 09 2019 18:15:05.425:INFO [launcher]: Launching browsers Chrome_travis_ci with concurrency unlimited
11 09 2019 18:15:05.429:INFO [launcher]: Starting browser Chrome
11 09 2019 18:16:05.435:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
11 09 2019 18:16:07.439:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
11 09 2019 18:16:09.439:WARN [launcher]: Chrome was not killed by SIGKILL in 2000 ms, continuing.
It's unclear to me whether the issue is with my Travis config, my Karma config, or something else.
Solutions tried:
Follow instructions for GUI and Headless Browser Testing on TravisCI
Specify xvfb-run command in travis.yml (per this answer)
Add --disable-setuid-sandbox flag to karma.conf.js (per this comment)
travis.yml:
sudo: required
dist: xenial
services:
- xvfb
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
language: node_js
node_js:
- "10"
- "8"
cache:
directories: node_modules
before_install:
- export CHROME_BIN=chromium-browser
before_script:
- npm rebuild node-sass
script:
- npm run lint
- npm run test:ci # Runs: xvfb-run -a karma start
- npm run build
karma.conf.js:
module.exports = (config) => {
config.set({
browsers: [process.env.TRAVIS ? 'Chrome_travis_ci' : 'Chrome'],
client: {
captureConsole: false,
},
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox', '--disable-setuid-sandbox'],
},
},
files: ['test/index.js'],
frameworks: ['mocha', 'chai'],
preprocessors: {
'test/index.js': ['webpack', 'sourcemap'],
},
reporters: ['dots'],
singleRun: true,
webpack: Object.assign(webpackConfigBase, {
devtool: 'inline-source-map',
mode: 'development',
}),
webpackServer: {
noInfo: true,
},
});
};
Any help or suggestions appreciated. Thanks!

Solution: Remove the before_install config from my travis.yml completely.
After more searching I was finally tipped off to a possible solution by this comment:
At first I used Chromium, and decided to switch to google-chrome latest versions because of protractor tests. I... [found] that my karma was using (I don't know how) a chromium bin env variable, even though I did set it correctly with the dockerfile!
The only fix is to re-set this env variable in my jenkins job as well :
# Set CHROME_BIN because it is incorrect even from Dockerfile
export CHROME_BIN=/usr/bin/google-chrome
Updating my travis.yml file from
before_install:
- export CHROME_BIN=chromium-browser
to
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
solved the problem for me. I then went further and removed the command completely and everything still worked.

Related

chromedriver Only local connections are allowed

I try to start tests by webdriver-manager and protractor.
Verify versions:
Google Chrome 73.0.3683.86
ChromeDriver 73.0.3683.68
start webdriver-manager webdriver-manager start
and start protractor
I got error by protractor
enviroment: test
[12:20:23] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[12:20:23] E/driverProvider - Error code: 135
[12:20:23] E/driverProvider - Error message: unknown error: Chrome failed to start: exited abnormally
[12:20:23] E/driverProvider - Error: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.9.0-8-amd64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 172 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'dev', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.0-8-amd64', java.version: '1.8.0_212'
Driver info: driver.version: unknown
at Hosted.<anonymous> (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:69:23)
at Generator.throw (<anonymous>)
at rejected (/usr/lib/node_modules/protractor/built/driverProviders/driverProvider.js:5:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
[12:20:23] E/launcher - Process exited with error code 135
and info by webdriver-manager
12:19:38.934 INFO [ActiveSessionFactory.apply] - Capabilities are: {
"browserName": "chrome",
"count": 1
}
12:19:38.947 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 15966
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
protractor.conf.js in project folder (where I execute command protractor --host https://MySite
let test_url = '';
let enviroment = process.env.NODE_ENV;
console.log('enviroment:', enviroment);
//console.log('process.env:', process.env);
let settings = {
seleniumAddress: 'http://localhost:4444/wd/hub',
//directConnect: true,
specs: ['./e2e/todo-spec.js'],
// Options to be passed to Jasmine-node.
params: {
host: 'http://localhost:3000'
},
capabilities: {
browserName: 'chrome'
},
onPrepare: function() {
// The require statement must be down here, since jasmine-reporters#1.0
// needs jasmine to be in the global and protractor does not guarantee
// this until inside the onPrepare function.
var jasmineReporters = require('jasmine-reporters');
jasmine.getEnv().addReporter(
new jasmineReporters.JUnitXmlReporter('xmloutput', true, true)
);
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
}
if(process.env.hasOwnProperty('npm_config_host') && process.env.npm_config_host){
settings.params.host = process.env.npm_config_host
}
exports.config = settings;
In your chromeOptions, can you try adding --no-sandbox and --disable-dev-shm-usage and then try running the tests . Also try downgrading the browser version to see if the code is working as expected.
"chromeOptions": {
"args": ['--no-sandbox','--disable-dev-shm-usage'],
Remove seleniumAddress: fomr your config and add the below one.
exports.config = {
directConnect: true,
}
When you add dirctConnect=true you don't need to start the webdriver separately.
Hope it help you
Please make sure you have
127.0.0.1 localhost
in your /etc/hosts file.
To check it, you should go to the terminal and run
sudo vi /etc/hosts
type your user password and paste
127.0.0.1 localhost
to an empty row.
Additionally, please make sure you have ChromeDriver -or the driver of the browser you intend to use- is installed and your program knows the path of ChromeDriver.
You can follow the steps explained here https://www.browserstack.com/guide/run-selenium-tests-using-selenium-chromedriver.

How to run Protractor specs on IE 11?

I have been trying to run protractor specs on IE 11,with following conf.js:
multiCapabilities: [
{
'browserName': 'internet explorer',
version: 11,
'ignoreProtectedModeSettings': true
// 'idle-duration':10000,
},
}],
And added this as well:
seleniumArgs: 'C:/Users/LJQAuser/AppData/Roaming/npm/node_modules/protractor/node_modules/webdriver-manager/selenium/IEDriverServer.exe',
And set directConnect to : false
But still its showing error:
Error in console is:
[12:38:42] I/local - Starting selenium standalone server...
[12:38:43] E/launcher - Error: Error: Server terminated early with status 1
at earlyTermination.catch.e (C:\Users\LJQAuser\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\remote\index.js:252:52)
at :null:null
at process._tickCallback (internal/process/next_tick.js:188:7)
Closing report
[12:38:43] E/launcher - Process exited with error code 100
There is tons of issues with internet explorer. Probably you wont be able to run it successfully.
There is alot of manual steps also to be applied.
Here is some basic guide how to setup:
Protractor test in IE
https://qavalidation.com/2017/11/run-protractor-test-ie-internet-explorer.html/
Good luck!

dashDB Local on fedora 25 - error code 130

I tried 30 day trial of dashDB Local. I followed the steps described in the link:
https://www.ibm.com/support/knowledgecenter/en/SS6NHC/com.ibm.swg.im.dashdb.doc/admin/linux_deploy.html
I did not create a node configuration file because mine is a SMP setup.
Logged into my docker hub account and pulled the image.
docker login -u xxx -p yyyyy
docker pull ibmdashdb/local:latest-linux
The pull took 5 minutes or so. I waited for the image download to complete.
Ran the following command. It completed successfully.
docker run -d -it --privileged=true --net=host --name=dashDB -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 ibmdashdb/local:latest-linux
ran logs command
docker logs --follow dashDB
This showed dashDB did not start but exited with error code 130
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0f008f8e413d ibmdashdb/local:latest-linux "/usr/sbin/init" 16 seconds ago Exited (130) 1 seconds ago dashDB
#
logs command shows this:
2017-05-17T17:48:11.285582000Z Detected virtualization docker.
2017-05-17T17:48:11.286078000Z Detected architecture x86-64.
2017-05-17T17:48:11.286481000Z
2017-05-17T17:48:11.294224000Z Welcome to dashDB Local!
2017-05-17T17:48:11.294621000Z
2017-05-17T17:48:11.295022000Z Set hostname to <orion>.
2017-05-17T17:48:11.547189000Z Cannot add dependency job for unit systemd-tmpfiles-clean.timer, ignoring: Unit is masked.
2017-05-17T17:48:11.547619000Z [ OK ] Reached target Timers.
<snip>
2017-05-17T17:48:13.361610000Z [ OK ] Started The entrypoint script for initializing dashDB local.
2017-05-17T17:48:19.729980000Z [100209.207731] start_dashDB_local.sh[161]: /usr/lib/dashDB_local_common_functions.sh: line 1816: /tmp/etc_profile-LOCAL.cfg: No such file or directory
2017-05-17T17:48:20.236127000Z [100209.713223] start_dashDB_local.sh[161]: The dashDB Local container's environment is not set up yet.
2017-05-17T17:48:20.275248000Z [ OK ] Stopped Create Volatile Files and Directories.
<snip>
2017-05-17T17:48:20.737471000Z Sending SIGTERM to remaining processes...
2017-05-17T17:48:20.840909000Z Sending SIGKILL to remaining processes...
2017-05-17T17:48:20.880537000Z Powering off.
So it looks like start_dashDB_local.sh is failing at /usr/lib/dashDB_local_common_functions.sh 1816th line? I exported the image and this is the 1816th line of dashDB_local_common_functions.sh
update_etc_profile()
{
local runtime_env=$1
local cfg_file
# Check if /etc/profile/dashdb_env.sh is already updated
grep -q BLUMETAHOME /etc/profile.d/dashdb_env.sh
if [ $? -eq 0 ]; then
return
fi
case "$runtime_env" in
"AWS" | "V1.5" ) cfg_file="/tmp/etc_profile-V15_AWS.cfg"
;;
"V2.0" ) cfg_file="/tmp/etc_profile-V20.cfg"
;;
"LOCAL" ) # dashDB Local Case and also the default
cfg_file="/tmp/etc_profile-LOCAL.cfg"
;;
*) logger_error "Invalid ${runtime_env} value"
return
;;
esac
I also see /tmp/etc_profile-LOCAL.cfg in the image. Did I miss any step here?
I also created /mnt/clusterfs/nodes file ... but it did not help. The same docker run command failed in the same way.
Please help.
I am using x86_64 Fedora25.
# docker version
Client:
Version: 1.12.6
API version: 1.24
Package version: docker-common-1.12.6-6.gitae7d637.fc25.x86_64
Go version: go1.7.4
Git commit: ae7d637/1.12.6
Built: Mon Jan 30 16:15:28 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Package version: docker-common-1.12.6-6.gitae7d637.fc25.x86_64
Go version: go1.7.4
Git commit: ae7d637/1.12.6
Built: Mon Jan 30 16:15:28 2017
OS/Arch: linux/amd64
#
# cat /etc/fedora-release
Fedora release 25 (Twenty Five)
# uname -r
4.10.15-200.fc25.x86_64
#
Thanks for bringing this to our attention. I reached out to our developer team. It seems this is happening because inside the container, tmpfs gets mounted on to /tmp and wipes out all the scripts
We have seen this issue and moving to the latest version of docker seems to fix it. Your docker version commands shows it is an older version.
So please install the latest docker version and retry the deployment of dashdb Local and update here.
Regards
Murali

Landing page not displayed in browser

Everytime I run ipthon notebook in terminal, a blank page pops up in Chrome, instead of a normal dashboard page.
Relevant info
System: Mac OS X Yosemite
ipython in terminal works fine
All python staff is installed by Anaconda package
$ python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': '1c0eb68',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/Users/philip/anaconda/lib/python2.7/site-packages/IPython',
'ipython_version': '2.3.1',
'os_name': 'posix',
'platform': 'Darwin-14.1.0-x86_64-i386-64bit',
'sys_executable': '/Users/philip/anaconda/bin/python',
'sys_platform': 'darwin',
'sys_version': '2.7.9 |Anaconda 2.1.0 (x86_64)| (default, Dec 15 2014, 10:37:34) \n[GCC 4.2.1 (Apple Inc. build 5577)]'}
Start server with debug flag in terminal
$ ipython notebook --debug
2015-02-08 11:37:37.661 [NotebookApp] Config changed:
2015-02-08 11:37:37.661 [NotebookApp] {'Application': {'log_level': 10}}
2015-02-08 11:37:37.661 [NotebookApp] IPYTHONDIR set to: /Users/philip/.ipython
2015-02-08 11:37:37.662 [NotebookApp] Using existing profile dir: u'/Users/philip/.ipython/profile_default'
2015-02-08 11:37:37.662 [NotebookApp] Searching path [u'/Users/philip/Downloads/quant/backtesting', u'/Users/philip/.ipython/profile_default'] for config files
2015-02-08 11:37:37.662 [NotebookApp] Attempting to load config file: ipython_config.py
2015-02-08 11:37:37.664 [NotebookApp] Loaded config file: /Users/philip/.ipython/profile_default/ipython_config.py
2015-02-08 11:37:37.664 [NotebookApp] Attempting to load config file: ipython_notebook_config.py
2015-02-08 11:37:37.665 [NotebookApp] Loaded config file: /Users/philip/.ipython/profile_default/ipython_notebook_config.py
2015-02-08 11:37:37.668 [NotebookApp] Adding cluster profile 'default'
2015-02-08 11:37:37.668 [NotebookApp] searching for local mathjax in [u'/Users/philip/.ipython/nbextensions']
2015-02-08 11:37:37.668 [NotebookApp] Serving local MathJax from /Users/philip/.ipython/nbextensions/mathjax/MathJax.js at /nbextensions/mathjax/MathJax.js
2015-02-08 11:37:37.742 [NotebookApp] Serving notebooks from local directory: /Users/philip/Downloads/quant/backtesting
2015-02-08 11:37:37.742 [NotebookApp] 0 active kernels
2015-02-08 11:37:37.742 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2015-02-08 11:37:37.742 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Remedies I have tried so far
Remove entire anaconda package. Use brew version of python interpreter instead. pip install ipython[all]. After that, I still get a blank page.
It makes me wonder it has something to do with OS X system, not really an python/ipython/notebook/anaconda issue. Maybe some system libraies are missing or not symlinked etc. The quesion is how to debug that?
Update
After update ipython via conda, I still got blank landing page
I fix the problem after 10+ hours of iterative debug. In the end of day, it's simply a missing line "127.0.0.1 localhost" in hosts file. As a result, Chrome cannot resolve localhost. I have no idea how that line is removed or when. But thank god, it's over.

karma-sauce-launcher disconnects every test run resulting in failed runs with IE and Safari

I have been having this exact issue for months now, through multiple versions of each component involved (karma, socket.io, sauce-connect). Currently I'm running on Karma 12.16.
Basically, when using https://github.com/karma-runner/karma-sauce-launcher, Safari and IE browsers launched disconnect every single test run resulting in only a partial test run. The relevant Karma log is
Driving the web on session: abf7c976abf1420a9c72b3e06c655040
DEBUG [wd]: > RESPONSE init({"base":"SauceLabs","browserName":"internet explorer","platform":"Windows 8.1","version":"11","tags":[],"name":"Karma and Sauce Labs demo","record-video":false,"record-screenshots":true,"build":null,"device-orientation":null,"disable-popup-handler":true}) "abf7c976abf1420a9c72b3e06c655040",null
INFO [launcher.sauce]: internet explorer 11 (Windows 8.1) session at https://saucelabs.com/tests/abf7c976abf1420a9c72b3e06c655040
DEBUG [launcher.sauce]: WebDriver channel for internet explorer 11 (Windows 8.1) instantiated, opening http://localhost:9876/?id=15483642
DEBUG [wd]: > CALL get("http://localhost:9876/?id=15483642")
DEBUG [wd]: > POST /session/:sessionID/url {"url":"http://localhost:9876/?id=15483642"}
DEBUG [web-server]: serving: /Volumes/OSXSTORAGE/Users/a/Dropbox/a/WebstormProjects/a-ui/node_modules/karma/static/client.html
DEBUG [web-server]: serving: /Volumes/OSXSTORAGE/Users/a/Dropbox/a/WebstormProjects/a-ui/node_modules/karma/static/karma.js
DEBUG [wd]: > RESPONSE get("http://localhost:9876/?id=15483642")
DEBUG [karma]: A browser has connected on socket xXySXoeppVtPhAr8FVR4
INFO [IE 11.0.0 (Windows)]: Connected on socket xXySXoeppVtPhAr8FVR4 with id 15483642
DEBUG [launcher]: internet explorer 11 (Windows 8.1) on SauceLabs (id 15483642) captured in 17.693 secs
DEBUG [web-server]: serving: /Volumes/OSXSTORAGE/Users/a/Dropbox/a/WebstormProjects/a-ui/node_modules/karma/static/context.html
DEBUG [web-server]: serving (cached): /Volumes/OSXSTORAGE/Users/a/Dropbox/a/WebstormProjects/a-ui/src/components/angular/angular.js
................................................................................
..............DEBUG [karma]: A browser has connected on socket mGf0VzQ8DKdfW_NSFVR5
DEBUG [IE 11.0.0 (Windows)]: New connection mGf0VzQ8DKdfW_NSFVR5 (already have xXySXoeppVtPhAr8FVR4)
WARN [IE 11.0.0 (Windows)]: Disconnected (1 times), because no message in 10000 ms.
IE 11.0.0 (Windows): Executed 94 of 94 DISCONNECTED (11.481 secs / 0.757 secs)
DEBUG [launcher.sauce]: Shutting down the internet explorer 11 (Windows 8.1) driver
DEBUG [wd]: > CALL get("about:blank")
DEBUG [wd]: > POST /session/:sessionID/url {"url":"about:blank"}
DEBUG [karma]: Run complete, exitting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [wd]: > RESPONSE get("about:blank")
DEBUG [wd]: > CALL quit()
DEBUG [wd]: > DELETE /session/:sessionID
DEBUG [wd]:
Ending your web drivage..
DEBUG [wd]: > RESPONSE quit()
I have tried increasing browserNoActivityTimeout to 60000, but that just results in the tests failing after 60s instead of 10s. Every one of these failed has the following:
DEBUG [karma]: A browser has connected on socket mGf0VzQ8DKdfW_NSFVR5
DEBUG [IE 11.0.0 (Windows)]: New connection mGf0VzQ8DKdfW_NSFVR5 (already have xXySXoeppVtPhAr8FVR4)
WARN [IE 11.0.0 (Windows)]: Disconnected (1 times), because no message in 10000 ms.
IE 11.0.0 (Windows): Executed 94 of 94 DISCONNECTED (11.481 secs / 0.757 secs)
Depending on the browser, sometimes it will only execute 50 tests (Executed 50 of 94 DISCONNECTED), and on others it will execute all tests, but still be considered a failed test run. I have never seen this occur with Chrome or Firefox.
The exact same karma.conf file will run every time locally with no issues. Has anyone encountered this? I have reached out to saucelabs support, but they are starting to insist that this is a karma-sauce-launcher issue.
Karma.conf:
var fs = require('fs');
module.exports = function(config) {
// Use ENV vars on Travis and sauce.json locally to get credentials
if (!process.env.SAUCE_USERNAME) {
if (!fs.existsSync('sauce.json')) {
console.log('Create a sauce.json with your credentials based on the sauce-sample.json file.');
process.exit(1);
} else {
process.env.SAUCE_USERNAME = require('./../sauce').username;
process.env.SAUCE_ACCESS_KEY = require('./../sauce').accessKey;
}
}
// Browsers to run on Sauce Labs
var customLaunchers = {
sl_safari_ml: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.9'
}
};
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '../',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'src/components/jquery/dist/jquery.js',
'src/components/angular/angular.js',
'src/components/angular-mocks/angular-mocks.js',
'src/components/angular-cookies/angular-cookies.js',
'src/components/angular-sanitize/angular-sanitize.js',
'src/components/angular-ui-router/release/angular-ui-router.js',
'src/components/angular-animate/angular-animate.js',
'src/components/angular-strap/dist/angular-strap.js',
'src/components/angular-strap/dist/angular-strap.tpl.js',
'src/components/speakingurl/lib/index.js',
'src/app/**/*.js',
'src/app/common/templates/*.html'
],
exclude: [
'src/app/**/*.e2e.spec.js'
],
ngHtml2JsPreprocessor: {
stripPrefix: 'src/app/common/',
moduleName: 'mywire.templates'
},
preprocessors: {
// load templates
'src/app/common/templates/*.html': ['ng-html2js']
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots'],
// web server port
port: 9876,
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
sauceLabs: {
testName: 'Karma and Sauce Labs demo',
startConnect: false
},
browserNoActivityTimeout: 60000,
captureTimeout: 120000,
customLaunchers: customLaunchers,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: Object.keys(customLaunchers),
singleRun: true
});
};
Starting Karma version 0.12 there are some more timeout settings added.
Adding them to my karma config resolved this issue for me.
browserDisconnectTimeout
Type: Number
Default: 2000
Description: How long does Karma wait for
a browser to reconnect (in ms). With a flaky connection it is pretty
common that browser disconnects but the actual execution is running
without any problems. Karma does not treat a disconnection as
immediate failure and rather wait browserDisconnectTimeout ms. If the
browser reconnect during that time, everything is fine.
-
browserDisconnectTolerance
Type: Number
Default: 0
Description: The number of disconnections tolerated.
The disconnectTolerance value represents the maximum number of tries a browser will attempt in case of disconnection. Usually any disconnection is considered as a failure, but this option allows to define a tolerance level when there is a flaky network link between the karma server and the browsers.
-
browserNoActivityTimeout
Type: Number
Default: 10000
Description: How long does Karma wait for a message from a browser before disconnecting it (in ms).
If, during the execution, Karma does not receive any message from a browser within browserNoActivityTimeout ms, it will disconnect the browser.
source: http://karma-runner.github.io/0.12/config/configuration-file.html
more tips: http://oligofren.wordpress.com/2014/05/27/running-karma-tests-on-browserstack/