-
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
Angular 14 karma gets stuck after executing tests inside Gitlab Kubernetes Pod runner for ChromeHeadless and does not exit #3803
Comments
Seems to be actually a problem of the test runner container, closing this for now: |
I have the same problem - when running directly via Debug output before it hangs:
|
Hi, I am experiencing exactly the same issue in my project after upgrading it to Angular 14. It was working fine on Angular 12. @daniel-sc , @MichaelPeter , if you find any work around, can you please share it? |
Hi @ravasconcelos, we solved it by switching to Chrome instead of using ChromeHeadless since there is no exit script for it. So: browsers: ['Chrome'] Hope it helps you, too. |
We have the same Issue after upgrading to Angular 14. Is there any workaround until now ? |
Hi @RobinMobers97 , this hack worked for me: karma-runner/karma-browserstack-launcher#195 (comment) I hope it will be fixed soon. |
Hi,we have the same Issue after upgrading to Angular 14. Will this be fixed soon? |
have you tried to switch from ChromeHeadless to browsers: ['Chrome'] in your karma.conf.json? This worked for us :) |
@mrs-cp yes, we tried, but it doesn't work :( |
have you updated your docker images to trion/ng-cli:14.2.1 or trion/ng-cli-karma:14.2.1, respectively? |
@mrs-cp yes, i experienced so we have to use trion/ng-cli-karma:13 and ng test for now |
Had a similar issue on github... oddly enough disabling analytics in the Do one of the following:
|
Any update on this? |
We are also facing the same problem on angular 15.x and 16.x We tried the hacks provided here but unfortunately, they did not work for us. |
Hi!! I fixed the problem and I post in here trion-development/docker-ng-cli-karma#14 (comment). |
So I've got a flavor of this happening with Karma (v6.4.3) being called by Angular's test runner in CI with the following command:
In researching the problem, I found: karma-runner/karma-browserstack-launcher#195 (comment) The suggestion therein is simply to add a process exit at the end of the close event on the web server. That would be here: Line 473 in 84f85e7
The "hacky workaround" therein was to add
after the removeAllListeners() call. I tried this on my own machine (not the CI host) and it didn't seem to break anything, although I've never had this hangup on my host, just CI. Looking above, I wonder if the
already up there on line 468 would work similarly. Just food for thought, I'll probably try this out in the next few days, a few folks in the linked thread suggested this helped them with troubles in this area. |
I checked already the troubleshooting guide. We recently upgraded from angular 12 to angular 14 and since then our pipline gets stuck on testing inside the gitlab pipline after executing all tests, but not on our local maschines.
Now if we execute ng test on our pcs, the testsuite executes, but if our CI pipline in Gitlab (which provisions Kubernets Pods) executes the tests it gets stuck after executing all tests and does not exit anymore (we waited up to an hour)
We have a angular solution with about 10 projects and every project has its own karma config, which are all quite simular.
If we even remove the tests for the last project still the same error happens.
Here is the end of the debug log.
As you can see it gets stuck after Destroying proxy agents
Any ideas/tips how I could fix it, work arround it?
One Idea is that our pods don't have too much memory and that the pods run out of memory, but then we still need a solution.
The docker image executing the tests is the latest version of
trion/ng-cli-karma
https://hub.docker.com/r/trion/ng-cli-karma/tags
Here is the command line:
ng test --code-coverage --no-watch --browsers=ChromeHeadless --source-map=false
here the karma config of the last project ot be exeucted, but they are essentially the same
and here the depedencies of our package.json
As you can see we upgraded to the latest versions
Thank you very much for your time!
The text was updated successfully, but these errors were encountered: