question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Karma hangs when using karma run

See original GitHub issue

Versions

    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.2.8 (e)
node: 8.8.1
os: linux x64
@angular/animations: 4.4.6
@angular/common: 4.4.6
@angular/compiler: 4.4.6
@angular/core: 4.4.6
@angular/forms: 4.4.6
@angular/http: 4.4.6
@angular/platform-browser: 4.4.6
@angular/platform-browser-dynamic: 4.4.6
@angular/router: 4.4.6
@angular/cli: 1.2.8
@angular/compiler-cli: 4.4.6
@angular/language-service: 4.4.6

Repro steps

  • Create a new project with ng new <projectname>
  • Open karma.conf.js and change autoWatch: true to autoWatch: false
  • Spawn the test server with karma start
  • Change styleUrls: ['./app.component.css'] to styleUrls: ['./app.comonent.css'] so the code is invalid and will trigger a webpack compilation error (typescript compile errors will have the same effect).
  • Karma server will now error, this is fine.
  • In another terminal, in the same directory execute karma run

Observed behavior

karma run now hangs untill the error is resolved.

Desired behavior

karma run should terminate with an error.

Mention any other details that might be useful (optional)

When configuring the project with the steps provided by the angular documentation this does not happen (https://angular.io/guide/webpack). This approach does not use the @Angular/cli so the problem seems to be in @Angular/cli

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sanderkoenderscommented, Nov 22, 2017

I could try to diagnose the problem and shoot in a pull-request if that would speed up the process. Just tell me whether this is a bug or intended behaviour in your point of view.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma freezes randomly when we try to run karma. #3389
Hi all, When i use the default install from: npm init @open-wc karma start randomly freezes, when i put on the debug log...
Read more >
Karma hangs at Karma starting - jasmine - Stack Overflow
Karma is starting up with chrome, but it hangs at karma starting and nothing more is happening. However i can go into http://localhost:9876/ ......
Read more >
Troubleshooting - Karma test runner
The --no-single-run option causes the server to print a URL and wait. Open the URL in a browser and use the browsers devtools...
Read more >
Karma Server Hangs on capturing browser : WEB-33839
Karma Connecting to Chrome Browser and running the tests. What happens instead? Hangs. Throws no errors. Was testing with Karma in Angular 6...
Read more >
karma hangs after tests
If you have opted to have Karma stay running and monitor files, each time one of those files changes the tests will be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found