-
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
browser disconnection when debugging tests #590
Comments
If a coverage is configured, things are even worse.
After that karma server process is terminated. |
As for the first issue, I'm not sure what the exact reason is, but there might be some timeout and I assume the browser kills the websocket connection. The debugger pauses all JS execution. This is not a high priority for me, you should use http://localhost:9876/debug.html for debugging. Ad second issue (with coverage), I fixed that: |
If |
Maybe I'm missing something, but I don't think we have control over this. Debugger just pauses ANY JS execution and there's probably some browser timeout, that cancels the requests (even websocket). I'm not totally positive with the details though. |
Yes, you're right about the cause. Unfortunately, I still don't have a good solution for this issue. For now, WebStorm Karma integration uses
A possible solution for the second issue is to send some special message to console.log in Sorry for the long comment. I don't lose hope that it'd be possible to debug tests in |
@segrey Maybe you can try different transports (instead of websocket, html-polling or jsonp-polling might be less sensitive to paused debugger). We can also fiddle with socket.io configuration, maybe we can set some longer timeout. |
When a browser disconnects during a test run, Karma waits for reconnecting (configurable by `browserDisconnectTimeout`). If the browser reconnects in this timeout frame, nothing happpens - Karma replies the events (results) and the test run continues. If the browser does not reconnect in the timeout frame, Karma fails the build. This should solve the connection issues with IE on polling. - add browserDisconnectTimeout config property (defaults to 2000) Internal changes: - `Browser.isReady` is a function now, as browser has multiple states - `BrowserCollection.setAllIsReadyTo` -> `setAllToExecuting` - remove `Browser.launchId`, we use `Browser.id` instead Closes #82 Closes #590
When a browser disconnects during a test run, Karma waits for reconnecting (configurable by `browserDisconnectTimeout`). If the browser reconnects in this timeout frame, nothing happpens - Karma replies the events (results) and the test run continues. If the browser does not reconnect in the timeout frame, Karma fails the build. This should solve the connection issues with IE on polling. - add browserDisconnectTimeout config property (defaults to 2000) Internal changes: - `Browser.isReady` is a function now, as browser has multiple states - `BrowserCollection.setAllIsReadyTo` -> `setAllToExecuting` - remove `Browser.launchId`, we use `Browser.id` instead Closes #82 Closes #590
Reproduced with karma@0.9.3
karma run
command.karma run
command.karma run
command exits unexpectedly.Karma server log:
The text was updated successfully, but these errors were encountered: