-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Bug]: Jest worker encountered 3 child process exceptions, exceeding retry limit #13007
Comments
I am having the exact same issue (obviously with a different file though). The differences in my environment are: OS - MacOS Monteray v12.4 |
Hi I'm also facing the same issue, what is the reason for this |
I can also reproduce it with this environment: |
With Jest 27 I didn't have the problem, when I switched to Jest 28 I had the same error. I had problems importing in the files where I had this error. I don't know why it was not a problem with the build and with version 27. Now it works |
oh thanks, i'll try it tonight |
My issue was with mocks, after fixing them issue got resolved |
As noted in the Bug Report template, all bug reports requires a minimal reproduction. Please open up a new issue providing one. Read more at https://stackoverflow.com/help/minimal-reproducible-example. |
@wkul9429 how exactly did you fix it? |
I had exact same error message on CI tests. It affected all my test cases. This message hides real problem. You have to change maxWorkers to 1 to see what is the problem on single thread. Then you will see cause of error which helps you to resolve issue. |
It appears that Node 15 introduced a breaking change to promise rejection handling. Reference https://developer.ibm.com/blogs/nodejs-15-release-blog/ |
yes, it's the problem. And it turned out debugging of unhandled rejected promises is so painful |
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. |
Version
28.1.2
Steps to reproduce
https://github.com/shaobeichen/blog
Expected behavior
no error
Actual behavior
$ yarn test:coverage
yarn run v1.22.19
$ jest --coverage --maxWorkers 2 --unhandled-rejections=warn
PASS src/components/abstract/toast/tests/toast.test.ts
√ 创建一个弹窗,持续3秒 (13 ms)
√ 命令式调用,创建一个弹窗 (12 ms)
Running coverage on untested files...Failed to collect coverage from D:\work\blog\src\utils\request\base.ts
ERROR: Jest worker encountered 3 child process exceptions, exceeding retry limit
STACK: Error: Jest worker encountered 3 child process exceptions, exceeding retry limit
at ChildProcessWorker.initialize (D:\work\blog\node_modules\jest-worker\build\workers\ChildProcessWorker.js:170:21)
at ChildProcessWorker._onExit (D:\work\blog\node_modules\jest-worker\build\workers\ChildProcessWorker.js:254:12)
at ChildProcess.emit (node:events:520:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Failed to collect coverage from D:\work\blog\src\utils\request\mofish.ts
ERROR: Jest worker encountered 3 child process exceptions, exceeding retry limit
STACK: Error: Jest worker encountered 3 child process exceptions, exceeding retry limit
at ChildProcessWorker.initialize (D:\work\blog\node_modules\jest-worker\build\workers\ChildProcessWorker.js:170:21)
at ChildProcessWorker._onExit (D:\work\blog\node_modules\jest-worker\build\workers\ChildProcessWorker.js:254:12)
at ChildProcess.emit (node:events:520:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
-------------------------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-------------------------------|---------|----------|---------|---------|-------------------
All files | 20.86 | 30 | 15.38 | 20.83 |
src | 0 | 100 | 100 | 0 |
main.ts | 0 | 100 | 100 | 0 | 1-13
src/api | 0 | 100 | 0 | 0 |
toast.d.ts | 0 | 0 | 0 | 0 |
src/utils | 100 | 100 | 100 | 100 |
sleep.ts | 100 | 100 | 100 | 100 |
src/utils/request | 0 | 100 | 100 | 0 |
index.ts | 0 | 100 | 100 | 0 | 1-6
-------------------------------|---------|----------|---------|---------|-------------------
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 8.779 s
Ran all test suites.
Done in 9.76s.
Additional context
"test:coverage": "jest --coverage --maxWorkers 2"
not work
Environment
The text was updated successfully, but these errors were encountered: