-
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
Karma fails to start a browser on CI Server (v1.5.0) #2647
Comments
@tiefling is it reproduced for other browsers?(Chrome, Firefox) Could you run karma with log level equals DEBUG and post your karma.config.js Thanks |
I'll test all of the above and get more data on it for you - In the meantime, here's my config. Not sure how I can start it without gulp...
|
1.5.0 seems to work fine on my local machine - It fails on my Visual Studio Online CI Server (updated title to reflect). This makes recreating the problem here very difficult so I'm having to trigger many builds. |
Looking at the CI Server... v1.4.0 is also failing Here's some info from the npm install step that may be relevant...
On my local machine (which works) I'm running node v6.3.1 / npm v4.0.3 Here's the log output from that run (with all browsers enabled)...
I don't think it's possible to run this on the CI server without gulp as otherwise I won't have a compiled test bundle to run against. I am just queuing a build using 1.3.0 with DEBUG enabled to get you a comparative log. |
Comparative with 1.3.0 failed when running with all browsers (although it started running tests it didn't complete - not unexpected given I've never tried it before). Tried comparatives now with just Phantom, which has historically worked fine (it worked last night!)...
This is now not working anymore. Not sure what is broken now - I managed to get this working last night by reverting to 1.3.0 but now I'm just completely at a loss. So far the best result was a partial with all of the browsers on 1.3.0 (which looks like IE trying to do stuff)...
|
Not convinced this is a Karma problem specifically anymore but any help anyone can offer would be appreciated. |
Apologies. Found that, despite the log indicating it was finding it, that some of the build agents seem to fall over unless you provide the following environment variable... PHANTOMJS_BIN - C:\NPM\Modules\PhantomJS.cmd |
@tiefling Could you kindly explain in more detail what helped you to resolve the issue? I am trying to fire off an angular-cli boilerplate application tests in Visual Studio Team Services and "Cannot capture PhantomJS in 60000ms". :) |
You need to add the environment variable... PHANTOMJS_BIN: C:\NPM\Modules\PhantomJS.cmd to the 'Variables' section of the build configuration and you should find that will fix it. Not the most intuitive. |
Hello, I just wanted to let @tiefling know that I ran into the same issue on VST. The Solution was to add the PHANTOMJS_BIN information above into the build definition "Variables" tab. Worked like a charm. I am using the latest version of Karma for this. |
this does not solve the problem in my case, unfortunately. |
This is broken again... Adding a variable seems like a workaround rather than a fix, though I suspect this is actually an issue with the Agent Image, seeing as PhantomJS works fine locally... |
After seeing yet other errors with PhantomJS and karma I recently switched to pupeteer (chrome headless) and so far I have no issues. Neither local nor in Visual Studio Online. I just don't have the ressources to debug and find errors when other packages provide everything I need. |
@FizzBuzz791 Did you end up finding a solution to this? |
Related to Issue #558.
Using karma 1.5.0 on my CI server (Visual Studio Online)...
Trying using Chrome and Firefox results in similar errors.
My gulp task looks like this...
Specifying Karma v1.3.0 (which works on my dev machine) made the problem go away.
The text was updated successfully, but these errors were encountered: