-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
V13 upgrade : Jest has detected the following 2 open handles potentially keeping Jest from exiting #7843
Comments
@dean-g did you find something on your bug? I have exactly the same issue |
Facing the same issue. @dean-g, @tomalaforge Did you guys find any root cause/solution/workaround? |
@iKrishnaSahu nice to see that I'm not alone. And I'm sure many other are facing this issue. |
I've managed to "fix" this issue by changing |
seems like we only have some guesses, random anyone from Nrwl care to comment about this or what is coming to improve jest or even any active development on the jest tooling that can shed some light on this ? |
Just wanted to share that I'm having this issue even though I'm not using Nx. |
still no one have found a solution to this issue? |
Same for me, not using Nx so it is probably a bug with jest-preset-angular? |
In docs of jest-preset-angular https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+/ they write:
The
It works for me, but increase test time. |
I was having this issue as well after updating to nx 13.8.1 from 13.1.4 which bumped Angular to v13. I also tried @averath's suggestion from the jest-preset-angular docs, but then jest complains about potential open handles at
In the meantime, I've added {
forceExit: true
} to I don't think this is necessarily an nx issue, but the particular combination of associated jest and Angular versions seem to be involved. Once we figure this out, a migration script might be nice. |
@njlaw We have the same problem. Unfortunately |
So, I finally found the issue on our end! It looks like jest memory consumption increased just enough with the ng 13 version update to cause the oom-killer to randomly kill a node process (whichever one made the request that pushed the container over the limit). We were able to resolve this by setting The dmesg logs weren't being collected in our build environment, so it took a while to track down. Hopefully this helps someone else! |
My resolution (and root cause of the problem in my CI) is very environment specific, so it's definitely not going to be a general fix, but it might help one or two people who are running in containerized build environments and oversubscribing their memory allocation. |
any updates on this topic? we are having the same problem |
@chrizza87 can you see if @njlaw fix worked for you? |
I've had this error come up before in other situations, and the solution was always to fix my tests and clean up resources they were using. My fix above was basically a coincidental exception. The nx upgrade pulled in a jest and angular upgrade which bumped up my memory usage past the limit of my build container because I was very close to it before. I.e., it was not an nx issue at all. Under normal circumstances, I would focus on troubleshooting my tests. @chrizza87 What have you done for troubleshooting so far? |
Hey @njlaw , thx for the quick reply. The problem only occurs in the anuglar frontend unit tests. I thought the problem is caused by But i will recheck the unit tests of there are any problems or missing cleanup. |
Hi there We have the same issue in our project and i first openend thymikee/jest-preset-angular#1426 with a reproducible example but it looks more like a problem with angular itself and jest-preset-angular is only an indirection and thats why we opened angular/angular#45776. Lets see if they have some insights. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
open |
This still seems like a problem. I don't see a solution in the thread and the issue closed automatically. We need to reopen and try to solve it please. |
Hi Still facing this issue same as @tbogard, exactly the same log, seems like the issue was closed automatically. Should be reopened and reinvestigated. |
I am also experiencing this after the upgrade. Exact same error as @tbogard |
Same here. The issue as far I can see is related to Jest and not angular nor jest-preset-angular. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Hi
I am getting the following error on JEST test execution after the angular v13 upgrade,
`Jest has detected the following 2 open handles potentially keeping Jest from exiting:
● MESSAGEPORT
`
Can someone please help to fix this issue?
The text was updated successfully, but these errors were encountered: