You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that if the browser does not initially respond, the onBrowserStart function of the karma reporters is not fired.
This happens with high frequency with larger Angular projects. I believe the issue there is that the ng serve portion of ng test takes a while (the time it takes for the webpack dev server to start is quite long with large Angular projects). Karma considers this as chrome not responding. I think what is happening under the covers is that Chrome gives up trying to load the page and times out while trying to load a resource from the webpack dev server. Since chrome failed to load the page, karma then thinks that chrome is not responding.
This is seen in our CI builds when we don't get a coverage report:
START:
12 01 2022 20:32:01.145:INFO [karma-server]: Karma v6.3.9 server started at http://localhost:9876/
12 01 2022 20:32:01.145:INFO [launcher]: Launching browsers ChromeHeadless with concurrency unlimited
12 01 2022 20:32:01.152:INFO [launcher]: Starting browser Chrome
12 01 2022 20:34:01.547:WARN [launcher]: Chrome has not captured in 120000 ms, killing.
12 01 2022 20:34:04.784:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
12 01 2022 20:34:13.076:INFO [launcher]: Trying to start Chrome again (1/2).
✔ Browser application bundle generation complete.
The Browser application bundle generation complete. signifies when the webpack dev server finally started doing its job, so chrome has already died and been restarted.
This issue was originally filed as #945
The problem is surfacing as a coverage failure and was filed as karma-runner/karma-coverage#434
The issue is that if the browser does not initially respond, the
onBrowserStart
function of the karma reporters is not fired.This happens with high frequency with larger Angular projects. I believe the issue there is that the
ng serve
portion ofng test
takes a while (the time it takes for the webpack dev server to start is quite long with large Angular projects). Karma considers this as chrome not responding. I think what is happening under the covers is that Chrome gives up trying to load the page and times out while trying to load a resource from the webpack dev server. Since chrome failed to load the page, karma then thinks that chrome is not responding.This is seen in our CI builds when we don't get a coverage report:
The
Browser application bundle generation complete.
signifies when the webpack dev server finally started doing its job, so chrome has already died and been restarted.The issue seemed to be documented well by this person's comment:
karma-runner/karma-coverage#434 (comment)
The text was updated successfully, but these errors were encountered: