-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PhantomJS doesn't feel well (You need to include some adapter that implements karma.start method!) #1545
PhantomJS doesn't feel well (You need to include some adapter that implements karma.start method!) #1545
Comments
I get the same error locally, and so far I have figured out that it works with Chrome, but fails on headless phantomjs. Version 0.13.4 works fine. |
@arty-name what node version are you running, and what phantomjs-launcher and phantomjs version? |
@dignifiedquire, |
Same problem here (0.13.4 works): |
Does anyone see this issue consistently, or just sometimes? Because on travis I was able to get rid of the issue after the fifth test run or so. (Which doesn't give me any more ideas as to what the actual problem is :( ) @coderbyheart @arty-name any public code I could look at? |
It looks like I am facing similar problem. I am trying to setup Karma, Mocha, Chai and PhantomJS but I keep receiving this error: jkochman@spaceship:~/Work/MTViewCenter2$ karma start 05 08 2015 14:57:28.688:DEBUG [plugin]: Loading karma-* from /home/jkochman/Work/MTViewCenter2/node_modules 05 08 2015 14:57:28.691:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai. 05 08 2015 14:57:28.692:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-chrome-launcher. 05 08 2015 14:57:28.696:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-firefox-launcher. 05 08 2015 14:57:28.697:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha. 05 08 2015 14:57:28.698:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-phantomjs-launcher. 05 08 2015 14:57:28.723:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-requirejs. 05 08 2015 14:57:28.763:INFO [karma]: Karma v0.13.6 server started at http://localhost:9876/ 05 08 2015 14:57:28.767:INFO [launcher]: Starting browser PhantomJS 05 08 2015 14:57:28.767:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-44042 05 08 2015 14:57:28.770:DEBUG [launcher]: /home/jkochman/Work/MTViewCenter2/node_modules/phantomjs/lib/phantom/bin/phantomjs /tmp/karma-44042/capture.js 05 08 2015 14:57:28.881:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/client.html 05 08 2015 14:57:28.895:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/karma.js 05 08 2015 14:57:28.925:DEBUG [karma]: A browser has connected on socket ESN93SgZ9uM3wcjNAAAA 05 08 2015 14:57:28.928:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=ESN93SgZ9uM3wcjNAAAA 05 08 2015 14:57:28.997:INFO [PhantomJS 1.9.8 (Linux 0.0.0)]: Connected on socket ESN93SgZ9uM3wcjNAAAA with id 44042 05 08 2015 14:57:28.998:DEBUG [launcher]: PhantomJS (id 44042) captured in 0.234 secs 05 08 2015 14:57:29.003:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/context.html PhantomJS 1.9.8 (Linux 0.0.0) ERROR You need to include some adapter that implements __karma__.start method! 05 08 2015 14:57:29.050:DEBUG [karma]: Run complete, exiting. 05 08 2015 14:57:29.051:DEBUG [launcher]: Disconnecting all browsers 05 08 2015 14:57:29.061:DEBUG [launcher]: Process PhantomJS exited with code 0 05 08 2015 14:57:29.062:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-44042 If I add another browser like Chrome or Firefox it's running ok. I don't understand why there are two 'PhantomJS 1.9.8 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.041 secs / 0.001 secs)' lines though: jkochman@spaceship:~/Work/MTViewCenter2$ karma start 05 08 2015 14:59:34.099:DEBUG [plugin]: Loading karma-* from /home/jkochman/Work/MTViewCenter2/node_modules 05 08 2015 14:59:34.102:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai. 05 08 2015 14:59:34.103:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-chrome-launcher. 05 08 2015 14:59:34.107:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-firefox-launcher. 05 08 2015 14:59:34.108:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha. 05 08 2015 14:59:34.109:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-phantomjs-launcher. 05 08 2015 14:59:34.134:DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-requirejs. 05 08 2015 14:59:34.171:INFO [karma]: Karma v0.13.6 server started at http://localhost:9876/ 05 08 2015 14:59:34.175:INFO [launcher]: Starting browser Chrome 05 08 2015 14:59:34.175:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-55000399 05 08 2015 14:59:34.175:DEBUG [launcher]: google-chrome --user-data-dir=/tmp/karma-55000399 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate http://localhost:9876/?id=55000399 05 08 2015 14:59:34.181:INFO [launcher]: Starting browser PhantomJS 05 08 2015 14:59:34.182:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-26205044 05 08 2015 14:59:34.185:DEBUG [launcher]: /home/jkochman/Work/MTViewCenter2/node_modules/phantomjs/lib/phantom/bin/phantomjs /tmp/karma-26205044/capture.js 05 08 2015 14:59:34.306:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/client.html 05 08 2015 14:59:34.319:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/karma.js 05 08 2015 14:59:34.357:DEBUG [karma]: A browser has connected on socket 3muEwILnWOTT9zTHAAAA 05 08 2015 14:59:34.373:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=3muEwILnWOTT9zTHAAAA 05 08 2015 14:59:34.434:INFO [PhantomJS 1.9.8 (Linux 0.0.0)]: Connected on socket 3muEwILnWOTT9zTHAAAA with id 26205044 05 08 2015 14:59:34.435:DEBUG [launcher]: PhantomJS (id 26205044) captured in 0.263 secs 05 08 2015 14:59:34.441:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/context.html 05 08 2015 14:59:34.444:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/chai/chai.js 05 08 2015 14:59:34.446:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai/adapter.js 05 08 2015 14:59:34.448:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/mocha/mocha.js 05 08 2015 14:59:34.450:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha/lib/adapter.js 05 08 2015 14:59:34.450:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/test-main.js 05 08 2015 14:59:34.451:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/test/test.spec.js PhantomJS 1.9.8 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.041 secs / 0.001 secs) 05 08 2015 14:59:34.529:DEBUG [launcher]: Process PhantomJS exited with code 0 05 08 2015 14:59:34.530:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-26205044 05 08 2015 14:59:35.038:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/client.html 05 08 2015 14:59:35.048:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/karma.js 05 08 2015 14:59:35.125:DEBUG [karma]: A browser has connected on socket zS6D9KPF8OZCBj2IAAAB 05 08 2015 14:59:35.135:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=zS6D9KPF8OZCBj2IAAAB 05 08 2015 14:59:35.147:DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/favicon.ico 05 08 2015 14:59:35.150:INFO [Chrome 44.0.2403 (Linux 0.0.0)]: Connected on socket zS6D9KPF8OZCBj2IAAAB with id 55000399 05 08 2015 14:59:35.151:DEBUG [launcher]: Chrome (id 55000399) captured in 0.979 secs 05 08 2015 14:59:35.164:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/context.html 05 08 2015 14:59:35.169:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/chai/chai.js 05 08 2015 14:59:35.171:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai/adapter.js 05 08 2015 14:59:35.172:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/mocha/mocha.js 05 08 2015 14:59:35.177:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha/lib/adapter.js 05 08 2015 14:59:35.178:DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/test-main.js PhantomJS 1.9.8 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.041 secs / 0.001 secs) Chrome 44.0.2403 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.009 secs / 0.001 secs) TOTAL: 2 SUCCESS 05 08 2015 14:59:35.229:DEBUG [karma]: Run complete, exiting. 05 08 2015 14:59:35.230:DEBUG [launcher]: Disconnecting all browsers 05 08 2015 14:59:35.797:DEBUG [launcher]: Process Chrome exited with code 0 05 08 2015 14:59:35.797:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-55000399 It also works if I downgrade Karma to 0.12.37 (tried 0.13.4): jkochman@spaceship:~/Work/MTViewCenter2$ karma start DEBUG [plugin]: Loading karma-* from /home/jkochman/Work/MTViewCenter2/node_modules DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai. DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-chrome-launcher. DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-firefox-launcher. DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha. DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-phantomjs-launcher. DEBUG [plugin]: Loading plugin /home/jkochman/Work/MTViewCenter2/node_modules/karma-requirejs. DEBUG [watcher]: Resolved files: /home/jkochman/Work/MTViewCenter2/node_modules/chai/chai.js /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai/adapter.js /home/jkochman/Work/MTViewCenter2/node_modules/mocha/mocha.js /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha/lib/adapter.js /home/jkochman/Work/MTViewCenter2/test/test.spec.js INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/ INFO [launcher]: Starting browser PhantomJS DEBUG [temp-dir]: Creating temp dir at /tmp/karma-84303543 DEBUG [launcher]: /home/jkochman/Work/MTViewCenter2/node_modules/phantomjs/lib/phantom/bin/phantomjs /tmp/karma-84303543/capture.js DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/client.html DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/karma.js DEBUG [web-server]: upgrade /socket.io/1/websocket/1wdsyb1J3mcOT2vp9VqC DEBUG [karma]: A browser has connected on socket 1wdsyb1J3mcOT2vp9VqC INFO [PhantomJS 1.9.8 (Linux 0.0.0)]: Connected on socket 1wdsyb1J3mcOT2vp9VqC with id 84303543 DEBUG [launcher]: PhantomJS (id 84303543) captured in 0.378 secs DEBUG [web-server]: serving: /home/jkochman/Work/MTViewCenter2/node_modules/karma/static/context.html DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/chai/chai.js DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma-chai/adapter.js DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/mocha/mocha.js DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/node_modules/karma-mocha/lib/adapter.js DEBUG [web-server]: serving (cached): /home/jkochman/Work/MTViewCenter2/test/test.spec.js PhantomJS 1.9.8 (Linux 0.0.0): Executed 1 of 1 SUCCESS (0.044 secs / 0.001 secs) DEBUG [karma]: Run complete, exiting. DEBUG [launcher]: Disconnecting all browsers DEBUG [launcher]: Process PhantomJS exited with code 0 DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-84303543 Karma config:
|
Same issue here, Just noticed the issue, my test ran and eveything worked as expected the first time (singleRun: true, autoWatch: false). Then I ran them a second time and I couldn't get it to work again since. I get this error too:
However I didn't get the issue yet when i am using karma with (singleRun: false, autoWatch: true), does anyone have ? |
@dignifiedquire, I was getting this error quite reliably, but the code is not public, sorry |
Okay, I need some more details from you guys please, as I still can't reproduce this anywhere on my machines, could you please install the latest |
I'll try to debug using this asap. Also I'm using karma-mocha v0.1.10, maybe it's relevant ? I assume you don't ? |
No, but I just tried with [email protected] it was working fine with it for me |
So I have tried the debug configuration and as soon as I put Config:
Log of failure:
|
Log of successful fun in case you need it:
|
Okay, that might actually help me :) it looks like this issue is a race condition due to the changes I made in 96e33dc Let's see if I can fix that |
Okay, so please try out this pr #1546, you can install it by running $ cd node_modules
$ rm -rf karma
$ git clone https://github.com/Dignifiedquire/karma
$ git checkout 1545-race-agains-phantom
$ npm i
$ npm i -g grunt-cli # If you don't already have grunt installed
$ grunt build
$ cd ../.. |
Seems to work for me |
:) I'll wait for one more confirm and then release it |
Though for some reasons, I had to git clone your fork, checkout your branch instead of using npm install. The 'client' folder is missing with npm install and as a result static/karma.js is an 'empty' build when I follow your steps |
@kketch thanks, I had some typo in the npm install command I think, I've updated the installation details to use git, to ensure it works |
In my case it doesn't run the tests anymore with your karma version.
|
@coderbyheart I experimented the same behavior, and this was because I installed karma through npm install, in this case you may have a failed build of static/karma.js like me. Follow the updated steps above (using git clone instead of npm install) and I think you should be fine. |
Awesome. Works!
|
Released as 0.13.7 Thanks everyone for all the help! |
With 0.13.7, for me, it is ok locally on Windows 10 and Travis CI. |
Thanks for fixing this so quickly! |
I've seen the same error message for 0.13.7 and 0.13.10.
The Error goes like:
For me it looks quite similar to @arty-name's debug output. But it might be related to our use of systemjs. |
I'm getting this error with karma 0.13.19, OSX 10.10.5, with a very simple
The error:
I'll look into the code and see if I can find something Edit: launcher versions:
|
@mhintz you need to include a testing framework like mocha, jasmine or qunit, that's what the error is about. |
Aha, thanks! I had been including the karma-unexpected plugin, but that looks like it's terribly outdated. I'm working on a fork now. |
I'm not having luck with chrome: Chrome 49.0.2623 (Mac OS X 10.10.4) ERROR |
I'm getting the same error ( karma.start method!) with below, Debug output is as follows: |
On Travis CI with 0.13.6 I get with Node.js (with io.js it is ok) the following message:
You need to include some adapter that implements karma.start method!
Locally it is ok.
Reference:
P.S.: Locally on Windows 10 box.
The text was updated successfully, but these errors were encountered: