Open RodolpheGohard opened 8 years ago
I tried with chrome and simulated a crash by killing chrome process. It's the same:
Chrome 48.0.2564 (Windows 7 0.0.0): Executed 295 of 1279 (60 FAILED) (skipped 8) (0 secs / 4.933 secs)
27 05 2016 10:25:44.534:ERROR [launcher]: Chrome crashed.
27 05 2016 10:25:44.646:INFO [launcher]: Trying to start Chrome again (1/2).
27 05 2016 10:25:50.647:WARN [launcher]: Chrome have not captured in 6000 ms, killing.
27 05 2016 10:25:50.747:INFO [launcher]: Trying to start Chrome again (2/2).
27 05 2016 10:25:56.747:WARN [launcher]: Chrome have not captured in 6000 ms, killing.
27 05 2016 10:25:56.850:ERROR [launcher]: Chrome failed 2 times (timeout). Giving up.
I saw that karma actually opened chrome browser twice. So maybe something's wrong in the capture ?
I believe this is the problem:
In BaseLauncher, restart() calls self.start, which should emit a new start() event and cause the _start() functions to be called in the custom launchers. But the event only fires the first time, so _start() is never invoked by restart()
It may be that a different restart mechanism is needed.
is there any update on this ?
Still a problem
FWIW, I'm still seeing this problem using ChromeHeadless
. Most commonly this results when the test runner (mocha, in my case) hangs waiting on a promise which never resolves (due to an error) in a beforeEach
block.
Expected behavior
I expect karma to be able to restart phantomjs, as it tries to, whenever phantomjs crashes(which is commonplace).
Actual behavior
After a PhantomJs crash, karma tries and fails to restart it two times. Consider this log:
Enviroment Details
Windows 7 SP1 64bits Intel Core i7 16Gb
package.json 's depencies
PhantomJS version: 1.9.20
karma.config.js
fileNotes
Running the tests with chrome works. I've seen others bugs with PhantomJs capture timeouts, but here the thing is that it succeeds at first, but then fails on retries. So the configuration must be right