karma-runner / karma

Spectacular Test Runner for JavaScript
http://karma-runner.github.io
MIT License
11.95k stars 1.71k forks source link

Runner hangs with concurrency option set and failing browsers #1693

Open ghost opened 8 years ago

ghost commented 8 years ago

Env: Windows 7 Pro 64bit, runner run via grunt-karma

When concurrency is set (to 2 in this example), and all browsers in the "last concurrency batch" fail to connect even after retries, the runner hangs. This is the log:

D:\Herby\Work\gaff\gvp>grunt test
Running "testingbot-tunnel:tunnel" (testingbot-tunnel) task

Running "karma:testingbot" (karma) task
05 11 2015 12:16:48.286:INFO [karma]: Karma v0.13.15 server started at http://localhost:9000/
05 11 2015 12:16:48.304:INFO [launcher]: Starting browser firefox via Remote WebDriver
05 11 2015 12:16:48.337:INFO [launcher]: Starting browser googlechrome via Remote WebDriver
05 11 2015 12:16:56.603:INFO [Chrome 46.0.2490 (Windows 8.1 0.0.0)]: Connected on socket QVGhPwWhK4XA_y-cAAAA with id 7267888
05 11 2015 12:16:57.235:INFO [Firefox 38.0.0 (Windows 7 0.0.0)]: Connected on socket fRKIzbY1EZ-lFbMYAAAB with id 87610919
Firefox 38.0.0 (Windows 7 0.0.0): Executed 85 of 85 SUCCESS (6.966 secs / 5.569 secs)
Chrome 46.0.2490 (Windows 8.1 0.0.0): Executed 85 of 85 SUCCESS (7.252 secs / 6.244 secs)
05 11 2015 12:17:06.372:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:17:06.379:INFO [launcher]: Starting browser microsoftedge via Remote WebDriver
05 11 2015 12:17:08.640:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:17:08.648:INFO [launcher]: Starting browser iexplore via Remote WebDriver
05 11 2015 12:18:06.383:WARN [launcher]: microsoftedge via Remote WebDriver have not captured in 60000 ms, killing.
05 11 2015 12:18:08.486:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:18:08.502:INFO [launcher]: Trying to start microsoftedge via Remote WebDriver again (1/2).
05 11 2015 12:18:08.676:WARN [launcher]: iexplore via Remote WebDriver have not captured in 60000 ms, killing.
05 11 2015 12:18:10.457:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:18:10.463:INFO [launcher]: Trying to start iexplore via Remote WebDriver again (1/2).
05 11 2015 12:19:08.518:WARN [launcher]: microsoftedge via Remote WebDriver have not captured in 60000 ms, killing.
05 11 2015 12:19:10.485:WARN [launcher]: iexplore via Remote WebDriver have not captured in 60000 ms, killing.
05 11 2015 12:19:10.580:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:19:10.588:INFO [launcher]: Trying to start microsoftedge via Remote WebDriver again (2/2).
05 11 2015 12:19:12.174:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:19:12.177:INFO [launcher]: Trying to start iexplore via Remote WebDriver again (2/2).
05 11 2015 12:20:10.591:WARN [launcher]: microsoftedge via Remote WebDriver have not captured in 60000 ms, killing.
05 11 2015 12:20:12.186:WARN [launcher]: iexplore via Remote WebDriver have not captured in 60000 ms, killing.
05 11 2015 12:20:12.513:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:20:12.517:ERROR [launcher]: microsoftedge via Remote WebDriver failed 2 times (timeout). Giving up.
05 11 2015 12:20:13.872:INFO [WebDriver]: Killed Karma test.
05 11 2015 12:20:13.876:ERROR [launcher]: iexplore via Remote WebDriver failed 2 times (timeout). Giving up.

After this, the runner is simply stuck (waited until 12:23 and Ctrl-C'd it). BTW, Edge and IE are stuck b/c of #1606.

When I use karma-testingbot-launcher instead of karma-webdriver-launcher, the result is the same.

bvarga commented 8 years ago

I've the same issue, when setting concurency to 1, my tests will hang forever.

tried with browserstack launcher.

ngie-mp commented 7 years ago

Same issue as @bvarga, browser launchs but stuck there. Instead with singleRun to false it works