Title: Chrome/karma is started before the webpack dev server is ready to serve · Issue #22495 · angular/angular-cli · GitHub
Open Graph Title: Chrome/karma is started before the webpack dev server is ready to serve · Issue #22495 · angular/angular-cli
X Title: Chrome/karma is started before the webpack dev server is ready to serve · Issue #22495 · angular/angular-cli
Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug was not present was: .... No, AFAIK, this ...
Open Graph Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa...
X Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa...
Opengraph URL: https://github.com/angular/angular-cli/issues/22495
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Chrome/karma is started before the webpack dev server is ready to serve","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅--\u003e\r\n\r\n# 🐞 Bug report\r\n\r\n### Command (mark with an `x`)\r\n\r\n\u003c!-- Can you pin-point the command or commands that are effected by this bug? --\u003e\r\n\u003c!-- ✍️edit: --\u003e\r\n\r\n- [ ] new\r\n- [ ] build\r\n- [ ] serve\r\n- [x] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] extract-i18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [ ] doc\r\n\r\n### Is this a regression?\r\n\r\n\u003c!-- Did this behavior use to work in the previous version? --\u003e\r\n\u003c!-- ✍️--\u003e Yes, the previous version in which this bug was not present was: ....\r\n\r\nNo, AFAIK, this has always been present\r\n\r\n### Description\r\n\r\n\u003c!-- ✍️--\u003e A clear and concise description of the problem...\r\n\r\nThere is this issue in Karma: https://github.com/karma-runner/karma/issues/3745\r\n\r\nWhat happens is that Angular CLI is starting karma and the webpack dev server at the same time. On large Angular projects, like ours, Angular + webpack is very slow (1-2 minutes to start `ng serve` for example, separate issue we really need to address somehow). \r\n\r\nWhat seems to occur is that chrome (or ChromeHeadless) gives up trying to load the page (it would see the problem that the server is not responding). Karma then kills the browser and restarts it (triggering issue https://github.com/karma-runner/karma/issues/3745). Eventually the webpack dev server starts responding, and the tests run. Once the tests complete, the coverage report (and potentially other reporters) fail to write their reports.\r\n\r\nWhile there is a bug in Karma that needs to be fixed, it does not seem to make sense to start the test framework until the webpack dev server is ready to serve the application. When it is ready, we see the `Browser application bundle generation complete` printed to the terminal.\r\n\r\nIdeally karma would be started after a 200 HTTP response could be obtained from the webpack dev server\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\n\u003c!--\r\nSimple steps to reproduce this bug.\r\n\r\nPlease include: commands run (including args), packages added, related code changes.\r\n\r\nIf reproduction steps are not enough for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.\r\nA good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem.\r\nShare the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.\r\n\r\nIssues that don't have enough info and can't be reproduced will be closed.\r\n\r\nYou can read more about issue submission guidelines here: https://github.com/angular/angular-cli/blob/master/CONTRIBUTING.md#-submitting-an-issue\r\n--\u003e\r\n\r\nOnly thing that is required is to run `ng test` on an Angular project. The problem to reproduce is that the application has to have enough code to cause webpack dev server to be too slow to start before chrome gives up loading the page.\r\n\r\n## 🔥 Exception or Error\r\n\r\n\u003cpre\u003e\u003ccode\u003e\r\n\u003c!-- If the issue is accompanied by an exception or an error, please share it below: --\u003e\r\n\u003c!-- ✍️--\u003e\r\n\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\r\n## 🌍 Your Environment\r\n\r\n\u003cpre\u003e\u003ccode\u003e\r\n\u003c!-- run `ng version` and paste output below --\u003e\r\n\u003c!-- ✍️--\u003e\r\nAngular CLI: 13.1.2\r\nNode: 14.17.1\r\nPackage Manager: npm 6.14.13\r\nOS: darwin x64\r\n\r\nAngular: 13.1.1\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1301.2\r\n@angular-devkit/build-angular 13.1.2\r\n@angular-devkit/core 13.1.2\r\n@angular-devkit/schematics 13.1.2\r\n@angular/cli 13.1.2\r\n@ngtools/webpack 13.1.2\r\n@schematics/angular 13.1.2\r\nng-packagr 13.1.2\r\nrxjs 6.6.7\r\ntypescript 4.5.4\r\nwebpack 5.65.0\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\r\n**Anything else relevant?**\r\n\r\n\u003c!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. --\u003e\r\n\r\n\u003c!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. --\u003e\r\n","author":{"url":"https://github.com/arobinson","@type":"Person","name":"arobinson"},"datePublished":"2022-01-12T23:18:00.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/22495/angular-cli/issues/22495"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2788f958-3533-3110-0893-ace0ed7b751f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9076:39170A:334675E:4836F62:6A5F926A |
| html-safe-nonce | a1c541ebde8879a73a3cd317625c1e7de750b28066d4a744c6c634df9eba4bac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDc2OjM5MTcwQTozMzQ2NzVFOjQ4MzZGNjI6NkE1RjkyNkEiLCJ2aXNpdG9yX2lkIjoiNDgxNjg5MjU3Mzk5ODA5MjkwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9dddbb239df207caa9b7b08d717d7dc4c9f75b578c75b40bc87f5aad94fc2f3c |
| hovercard-subject-tag | issue:1100898798 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/22495/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0185f5c6e66436305609790d077f4fefbbfbe02c85a8229a6ed05a6394939d2b/angular/angular-cli/issues/22495 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0185f5c6e66436305609790d077f4fefbbfbe02c85a8229a6ed05a6394939d2b/angular/angular-cli/issues/22495 |
| og:image:alt | 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint extract-i18n run config help version doc Is this a regression? Yes, the previous version in which this bug wa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arobinson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 419b66b5f218029570caa18c30987e7dbabe4f5a6767918b33a504d02739c9c7 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | de5b18aa36dbc0b61e03aeb111e84e90fde499b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width