jestjs/jest

Jest can hang indefinitely in node 12

pllee opened this issue ยท 11 comments

pllee commented

๐Ÿ› Bug Report

Jest can hang indefinitely in node 12. I have seen this issue in docker and on osx.

To Reproduce

Steps to reproduce the behavior:

Call a library like get-port-sync during a jest run on node 12. I think deasync could be triggering this but I am not sure.

Expected behavior

Link to repl or repo (highly encouraged)

https://github.com/pllee/jest-get-port-sync

> jest-get-port-sync@1.0.0 log-port /jest-get-port-sync
> node -v && node log-port

v10.19.0
60199
jest-get-port-sync@1.0.0 log-port /jest-get-port-sync
> node -v && node log-port

v12.16.1
59872
> node -v && jest

v10.19.0
 PASS  ./getPort.test.js
  โœ“ gets a port sync (6ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.517s
Ran all test suites.
> jest-get-port-sync@1.0.0 test /jest-get-port-sync
> node -v && jest

v12.16.1

 RUNS  ./getPort.test.js

Any news on this? We're seeing something similar with node 12.16.1 and deasync

pllee commented

@bluesxman I added a repo that can reproduce this issue on demand but it got tagged as needs repro so I am not sure how the process works. What js library are you using that uses deasync I can add it to the bug repo.

We get infinitely hanging tests in Shepherd when we try to bump from node 10 to 12. Not sure if that is helpful?

For what it's worth our solution was to stop using deasync since its potentially problematic. I made an async alternative to what we were using deasync for.

I don't think we're using deasync just get hanging tests anytime we try to update past node 10.

Turns out we were using deasync from jest-transform-svelte. Moving away from it fixed things for us.

Same issue encountered, is there any workaround besides remove deasync dependency?

Same issue encountered, is there any workaround besides remove deasync dependency?

Not that I know of.

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.