-
Notifications
You must be signed in to change notification settings - Fork 122
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
Having problems running karma with jenkins in chrome #73
Comments
I don't have the same issues with the firefox launcher so this is less of a concern. Most of the dev's on my team use chrome anyways so its pretty much auto tested. Thanks |
Same issue here, launching chrome 52 when running karma tests in teamcity. The problem doesn't seem to arise if running interactively. |
For us it worked in versions prior to 52 |
Running into the same issue. Without any changes in any JS modules, this appears to stop working after Chrome upgraded from 51.0.2704.103 to 52.0.2743.82. Some time ago our e2e tests using a selenium server on Windows started to fail due to this issue. We have yet to validate if that still happens, but it might be related? We're not using Jenkins here (Microsoft Visual Studio Team Services) but a similar setup I guess. The build agent runs as a Windows Service in session 0, spawns a build process (Gulp in our case) which starts Chrome using this plugin. |
I was running into the same issue with both e2e protractor tests and Karma unit tests. Windows jenkins specifically (running manually in cmd was working fine). The (temp) fix was the same for both: In karma.conf:
In protractor.conf
"karma-chrome-launcher": "^1.0.1", and "protractor": "4.0.0", |
We tried edgahan's temp fix but it did not work for us. The issues started around upgrading to karma-chrome-launcher: 1.0.1 and Chrome 51 upgrading to 52. It's unclear what's the issue here since our Jenkins machine spits out: 12:49:29 [exec] [1] START:
12:49:29 [exec] [0] npm run lint exited with code 0
12:49:29 [exec] [1] 01 08 2016 12:49:22.360:INFO [karma]: Karma v1.1.1 server started at http://localhost:9876/
12:49:29 [exec] [1] 01 08 2016 12:49:22.362:INFO [launcher]: Launching browsers ChromeNoSandbox, ElectronNoSandbox with unlimited concurrency
12:49:29 [exec] [1] 01 08 2016 12:49:22.375:INFO [launcher]: Starting browser Chrome
12:49:29 [exec] [1] 01 08 2016 12:49:22.392:INFO [launcher]: Starting browser electron
12:49:29 [exec] [1] 01 08 2016 12:49:25.979:INFO [Chrome 52.0.2743 (Windows 8.1 0.0.0)]: Connected on socket /#80VNe5WGo53GZH1OAAAA with id 40667921
12:49:29 [exec] [1] Chrome 52.0.2743 (Windows 8.1 0.0.0) ERROR
12:49:29 [exec] [1] Script error.
12:49:29 [exec] [1] 01 08 2016 12:49:27.506:INFO [Chrome 47.0.2526 (Windows 8.1 0.0.0)]: Connected on socket /#q_QvLGea2t_M6n-fAAAB with id 49218709
12:49:29 [exec] [1] Chrome 47.0.2526 (Windows 8.1 0.0.0) ERROR
12:49:29 [exec] [1] Script error.
12:49:29 [exec] [1]
12:49:29 [exec] [1] Finished in 2.826 secs / 0 secs
12:49:29 [exec] [1]
12:49:29 [exec] [1]
12:49:29 [exec] [1] SUMMARY:
12:49:29 [exec] [1] √ 0 tests completed
12:49:29 [exec] [1] babel-node node_modules/karma/bin/karma start exited with code 1
12:49:29 [exec] Next up, will be checking if reverting to older launcher version helps. |
+1, started getting the same issue across all my projects with the following configuration:
Not using Jenkins, using TFS on Windows Server. Seems to be caused by the fact that Chrome is version 52. edgahan's fix worked for us. Can anyone confirm DavideDaniel's claim that this is a bug in Chromium? |
@edgahan's temporary fix seems to work here too, thanks. |
Same issue for me, but only experienced after the update to 52.0.2743.116. Can confirm --no-sandbox fixed issue for both Karma and Protractor tests. |
Experiencing this with Jenkins / Windows slave, Chrome 52, karma. @edgahan's fix worked for us! |
Thanks @edgahan - your fix helped us on TeamCity too after Chrome updated to 52 |
Seems to resolve an issue with running on the build server. karma-runner/karma-chrome-launcher#73 (comment)
Another option to fix this is to install v51.* on the build machine (after uninstalling 52.0.2743.116). It can be a bear to find usable, older versions of chrome though. |
Happens with Bamboo / Windows 10 using Chrome 52. @edgahan fix does not work. |
Cheers @edgahan, fix worked for us. Just like @peabnuts123, we are running: This was failing in Teamcity and VSTS when running karma. |
@edgahan's fix not worked for us. We are running: Mac OSX 10.11.6 |
Was experiencing this problem with Chrome update as of this morning to 53.0.2785 and seems to have resolved it. Anyone else confirm? |
@agccheung Yep. Can confirm that it is now working for us in Chrome 53.0.2785 |
53.0.2785 also working on our server |
It's breaking now, locally, for me since my Chrome updated to 53.0.2785. Anyone else having this issue? It was breaking on a Jenkins build since yesterday till we downgraded back to 52 today. |
Same problem for me with the following setup:
karma-chrome-launcher: 2.0.0 |
Having the same problem (but without Jenkins)! karma-chrome-launcher: 2.0.0 |
I am attempting to run in bamboo:
Same problem:
|
I'm seeing the same issue. Did you get anywhere with this @lucastheisen ? |
@cmacdonnacha , I heard that chrome 59 introduced headless support but have not yet had a chance to test that out... When I get a chance i will report back... |
@lucastheisen I'm running chrome headless version with karma on travis. |
We switched to chrome headless. Chrome 60 supports chrome headless on windows. |
Hello, I'm running into this as well now... after upgrading packages:
Chrome 60 is installed on Windows 7 64-bit. Tried the fix mentioned in this ticket, but it still cannot connect with --no-sandbox. Did anyone have a work around for this? |
I'm having this as well. "karma": "1.7.0", |
Having the same issue. Works fine on Linux. |
Try adding this to your Karma.conf.js
|
You can get the exact shell command that Karma is running by adding a log statement to |
Thanks for the info, will try it out and share my findings. |
hi dear all. Has this been somehow fixed? I have the same on the lastest Chrome / Debian. "karma": "1.7.1", |
@jotka Check this comment I gave on a related issue : karma-runner/karma#1206 (comment) I'm using the same versions as yours, and I can run everything without any problem now. |
@Tenmak's solution worked for me, thanks a lot ! |
this worked for me on build server:
|
Thank you, @edgahan ! (: |
I had the exact same issue with our jenkins and ChromeHeadless. This solved it for me: |
@edgahan Just wanted to report that even as of this late date, edgahan's fix solved my problem of Chrome not opening on a Jenkins Windows server. My client side unit tests via karma had been working fine in my Jenkins pipeline job. The pipeline job was very new though and had only been completely working for a couple days, but it definitely worked, including my client unit tests. Then, last Friday (3/22/2019) it broke with the same errors reported above ("Chrome failed 2 times (timeout). Giving up."). I tried edgahan's fix and the problem is resolved. I, myself, hadn't changed anything with the server that would explain why it suddenly broke. Maybe Chrome downloaded an update? Maybe our network/security team changed something? Don't know. Don't know the version of Chrome before now, but it's currently Version 73.0.3683.86 (Official Build) (64-bit) and says it's up to date. Here are the current versions of my Karma packages: karma@1.7.1 Just wanted to report this currently solved the problem for me because when I read this thread, and how long ago this was a problem, I was skeptical that it would resolve the problem, but it did. Thanks @edgahan ! |
I am facing the same issue with Karma and Chrome reported here with a Jenkins Agent/Slave on a Windows 7 (64-Bit) machine. The problem exists approx. since a week (I think it has something todo with a Chrome update). I had no hope that any of the proposed workaround would work for me. But after I read @joerattz update on this issue, I gave @edgahan 's workaround a try, and I can confirm that this solved my problem as well. Thanks @joerattz and @edgahan ! karma@4.0.1 |
To resolve the issue I added hostname: 'localhost', to my karma config. The issue I had related to an invalid url. |
Saved my life! :) Thank you lots! |
Hi Team, Today I solved this issue. We have a problem of extreme slowness with chrome browser with Jenkins. We executes selenium scripts on chromeBrowser in stateless mode and we experiencing extreme lag after recent chrome browser update. Root cause:- We scrutinize the root cause of the problem and we get to know the focus of web driver instance is not set on the chrome browser under execution. If you execute it by eclipse locally you can figure it out easily. once the browser is open and your focus is on the browser all test-cases executes fast if you minimize the browser then you notice delay in the execution. Here is the solution:- |
@edgahan suggestion didn't help either. Any alternate solutions ? |
After chrome updated today it seems our builds no longer work. interactive shells seem to work, just not in jenkins :(
chrome Version 52.0.2743.82 m
OS: Windows Server 2012 r2
The text was updated successfully, but these errors were encountered: