Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disconnected (1 times), because no message in 10000 ms using Karma-Jasmine

Using Karma runner with jasmine. After all the configuration done, I type on terminal the below command:

karma start public/javascripts/karma.conf.js

But I am getting the below error where my browser is getting closed.

INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 34.0.1847 (Mac OS X 10.9.2)]: Connected on socket hDO3pMdVNGcBMDx4FI0w with id 60695552
WARN [Chrome 34.0.1847 (Mac OS X 10.9.2)]: Disconnected (1 times), because no message in 10000 ms.

I changed the browserNoActivityTimeout in Karma config to 50 seconds but still the same error. Its happening for both safari and chrome. I have not tried for other browsers.

I could not find much input fro other github threads on the same issue. Like changing port does not help either.

Karma Version: 0.12.16
Nodejs version: 0.10.22
Mac OS: 10.9.2

Has anyone faced the same issue?

like image 884
Priyabrat Nanda Avatar asked May 14 '14 23:05

Priyabrat Nanda


People also ask

What is single run in karma?

The property singleRun controls how Karma executes, if set to true , Karma will start, launch configured browsers, run tests and then exit with a code of either 0 or 1 depending on whether or not all tests passed.


1 Answers

found the issue and resolve it. This was because requirejs was not included in the karma config where as all my controllers are getting loaded by requirejs. After including it in the frameworks, the issue was gone. I faced few more issues after that but was able to resolve and run a sample test case. i had to add "requirejs" in frameworks section in the karma conf file:: frameworks: ['jasmine', 'requirejs']

like image 97
Priyabrat Nanda Avatar answered Sep 28 '22 04:09

Priyabrat Nanda