-
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
Chrome have not captured in X ms, killing #1206
Comments
I'm seeing the exact same problem on a TeamCity build server. X = 60000 for me. I too can run the tests just fine on the build server as the TeamCity build agent user. I have a passing build on October 7 and the first failing on October 9. I have Karma locked to 0.12.23 in package.json so it's unlikely that Karma itself is the problem. Perhaps a dependency? My money was initially on Chrome 38, but if you say the problem occurs with PhantomJS also then I guess Chrome is off the hook... |
No it's clearly Chrome in my case. I downgraded to 37 and the problem went away. |
Hmm strange, since neither Phantom nor IE worked I assumed it's not the browser. But I'm surely willing to try it, however I can't really find a way to get an older version of Chrome. How did you downgrade to 37? |
I uninstalled Chrome 38. Then, I followed these instructions to disable updates: http://www.wikihow.com/Completely-Disable-Google-Chrome-Update (although I added the template as a computer policy rather than user policy). Finally, I installed Chrome 37 from here: https://gallery.technet.microsoft.com/Google-Chrome-version-f0619a1f |
Thanks a lot! I reverted to 37 (btw, some registry changes were needed as well to prevent the updates in my case, http://stackoverflow.com/questions/18483087/how-can-i-disable-google-chrome-auto-update and http://www.wintips.org/disable-google-chrome-automatic-update/) and it works! I also tried the beta 40 build and that one doesn't work either. I guess we should report an issue to chrome so it will be eventually fixed. |
@adrianhara is problem still reproduce on PhantomJS? Thanks! |
For me yes. PhantomJS works fine when karma is run manually, but starting it from the agent fails to connect to PhantomJS. Same with IE. This is why I initially thought it's a Karma issue, as all three browsers exhibited the same behavior. Maybe it's a combination of changes? We were using karma 0.10.x until recently (it was hardcoded in package.json) and decided to switch to the latest version a few weeks back. It worked fine with Chrome until a few days ago and then it stopped. We were actually using PhantomJS some time ago, but there were some other problems with it disconnecting after a failing test and never connecting again, so we switched to Chrome and it's been running since. 90% of our tests are testing logic not UI, so we don't actually care about the browser. |
I've also experienced this issue. We're using karma + grunt + grunt-karma-runner to run tests against firefox and chrome. The tests run fine on on a dev machine but fail when the grunt command is issued by a team city build to a team city agent (chrome not captured). Logging on to the agent itself and running the command from within the agent's build folder (i.e. running the same code just not remotely) also works fine. |
@danhaller try running karma without grunt( |
The problem also exists when running karma start. The problem doesn't appear isolated to karma though, I've noticed that my protractor tests are acting similarly too. The chrome process starts up but no commands appear to reach it. |
My situation is identical to @danhaller's. Any additional information would be appreciated. I hope pausing updates to Chrome isn't necessary because it's an involved process for a temporary gain. |
A workaround for team city: Start the agent from the command line instead of as a windows service. Not ideal, but easier than downgrading chrome. There's a bug report on the chrome bug tracker here |
Not ideal, but totally works. Karma runs and my builds are successful for the first time in 6 days. Thanks! I'll be keeping an eye on this issue until its resolution. Here is a link about starting the BuildAgent from the command line for those who are lazy: |
Same problem here using CCNet/Karma as Windows Service. It started failing after updating Chrome to 38.0.2125.101 on 2014/10/08. There is no problem when running from command line. |
Star this issue: https://code.google.com/p/chromium/issues/detail?id=422218 |
I just get an update to |
Same problem when we are running from Bamboo build. Will try to downgrade chrome |
The issue is resolved in Chrome 41.X (Currently Chrome Canary is on that version). |
Yep, Chrome 39 should include a fix. This is mentioned in the chromium issue linked to by @theodorejb. It's expected to be released on November 20th. |
You can manually update to Chrome 39 by navigating to My understanding is that 39 will be pushed in automatic updates in the next couple weeks. |
Closing, as this seems to be resolved, please comment / reopen if you are still experiencing this issue. |
Having trouble with Chrome Version 43.0.2357.130 m. Chrome opens with a page that says "Karma Starting", but Karma can't seem to capture the results. PhantomJS works fine. Karma v0.12.37 |
@Wasmoo Please try to open the dev tools and post your console output in general mode and in debug mode please |
For me, the problem turned out to actually just be that some days, the agent really did take longer than 6 seconds to spin up the browser and connect to Karma. Since the agent shares the hardware, sometimes it would get up in time, sometimes it wouldn't. Changed the timeout to 15 seconds, and all was well. |
I'm having this issue as well, on a wercker box. Haven't done anything, builds just starting failing beginning of this week. Our timeout is 60s, so that doesn't seem to be an issue |
I was able to resolve this with this workaround |
My problem was that Karma was attempting to execute a nonexistent file because my To solve this, make sure Karma browser environment variables ( You can also get the exact shell command that Karma is executing to try it yourself and see if it fails. To do that, modify }
this._execCommand = function (cmd, args) {
+ log.error([cmd, args.join(' ')].join(' '));
if (!cmd) {
log.error('No binary for %s browser on your platform.\n ' + Here's the output of Karma waits, not realizing that the binary doesn't exist. |
I had the same issue, and it was not cause by either the The issue is that I needed to setup the proxy environment variables for my Jenkins job (run through a docker) to ensure Local headless chrome needed no proxy configuration in my case, hence :
Hope this helps those in trouble EDIT : It's actually better to simply set a NO_PROXY env variable : N.B : At first I used Chromium, and decided to switch to google-chrome latest versions because of protractor tests. I actually ran into @chrismwendt issue, and his little edit allowed me to find 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 :
|
@Tenmak |
Can't believe it was the proxy setting... Thank you @Tenmak !! |
@Tenmak it worked for me, thanks a lot ! |
this worked for me on the build server:
|
On my case I am suspecting that when I start chrome outside of karma, it output How do I disable the DevTools? |
...
... Saved my life!!! :) Thank you lots! |
I've started having this issue on our build machine recently (like, a few days ago). The build is run by a bamboo agent which is basically a windows service which launches "grunt". The grunt task then runs karma (among other things) for the tests. When run by the agent the build fails with this message (after 2 tries).
Running the same command line as the agent starts karma, captures the browser and generally works fine. Increasing the timeout to 3 min instead of 1 didn't help.
Did something change recently in karma that might be causing this behavior when it's run by a service without UI?
l.e.: tried with PhantomJS and IE as well, same. So I'm guessing it's a problem with Karma.
The text was updated successfully, but these errors were encountered: