-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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] Exit handler never called during clean-install, with Node.js v22.5.0 #7657
Comments
Experiencing the same issue with Node v22.5.0. As a temporary fix, I reverted my workflow to my previously used version.
Interested to hear when a fix is made. |
We are having the same issue on our GitHub actions, and we confirmed that yesterday the actions were working while using |
I'm getting this as well. |
Also getting this in Azure Pipelines. |
Can confirm I receive this issue in Jenkins |
Can confirm the same issue with Google Cloud Build |
The same on GitHub runners |
Also seeing this with certain combinations of packages when doing fresh node environment installs with pre-commit. |
In HyperFormula project Node 22.5.0 fails to install dependencies with message:
Environment: Version 22.4.1 worked. GH workflow run: https://github.com/handsontable/hyperformula/actions/runs/9989988926/job/27610940453 |
CloudFlare page builders on Node 22 are also impacted but setting the NODE_ENV enviroment variable to 22.4 forces them to install 22.4.x and gets builds working again. |
quickly tried reproduction using steps mentioned in this issue with these configuration with node 22.4.1 and latest npm 10.8.2 works fine and install completes as expected every timevscode ➜ .../ubuntu/test/divviup-api/app (3edafae) $ npm -v
10.8.2
vscode ➜ .../ubuntu/test/divviup-api/app (3edafae) $ node -v
v22.4.1
vscode ➜ .../ubuntu/test/divviup-api/app (3edafae) $ npm ci
added 599 packages, and audited 600 packages in 19s
162 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities with node 22.5.0 and latest npm 10.8.2 hangs every timevscode ➜ .../ubuntu/test/divviup-api/app (3edafae) $ npm -v
10.8.2
vscode ➜ .../ubuntu/test/divviup-api/app (3edafae) $ node -v
v22.4.1
vscode ➜ .../ubuntu/test/divviup-api/app (3edafae) $ npm ci
⠼^C |
I don't see that anywhere, but perhaps npm swallows it?
/Users/wharney/.npm/_logs/2024-07-18T15_47_42_983Z-debug-0.log
|
This should work around nodejs/node#53902 / npm/cli#7657 et al.
I will see if I can reproduce it working w/ npm 10.6.0 in the latest Node.js, thanks. |
This should work around nodejs/node#53902 / npm/cli#7657 et al.
Based on This suggests that https://github.com/npm/cli/blob/9214be9ed8779493e00d193e36a930918a30be64/lib/cli/entry.js is not invoking Several potential points exist where the Line 70 in 9214be9
Additionally, the log shows that Line 141 in 9214be9
|
@RedYetiDev yes, that is what causes this message. You can read all about this here. It's never straightforward. There are fewer and fewer callbacks in the code, so this is increasingly caused by |
I still get the error in The fact that it worked even once means it may be a race condition based on volume of |
I woudn't be suprised if that was the case. The |
Thanks @RedYetiDev, unless someone brings us something largely net new we're gonna wait for the fix to FastApi in Node.js. |
Currently, there are two proposed solutions to the problem:
Tested with: # Remove previous data
rm -r node_modules || true
# Install large amounts of files, use $1 as the NODE path.
PATH=.$1:$PATH npm i @microsoft/api-documenter @microsoft/api-extractor @types/jest eslint --no-progress |
Hi guys, just trying to add a little bit of findings here, I built System info
and couldn't reproduce this issue (run multiple times)
Also tried with I think from what I've seen so far the crashes are related to pipelines / workflows that use Linux. |
I've been able to reproduce on both Windows and Linux. The trick is you need to (AFAICT) have a lot of files to install into |
I audited the use of Uses of
|
I will see if this helps me figure out where sync is happening. |
https://github.com/isaacs/minizlib/blob/3412623e9470bb72827c8a61e685140b5ee7b8a0/index.js#L133-L134
If zlib is calling close synchronously under the hood it could be where the error is happening. |
Tracing from minizlib down into node zlib. In minizlib calls _processChunk with no callback Is is inside I don't think this is related, it just happens to be a synchronous call in the code. |
This was fixed in Node.js v22.5.1 nodejs/node#53902 (comment) |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
(While there are similar issues already open, the wiki page for "exit handler never called" errors recommends opening a new issue, so I am doing so)
I am running into errors when using Node.js v22.5.0 and npm v10.8.2 to install dependencies. In GitHub Actions, I'm seeing an "Exit handler never called!" error. I tried installing the same versions locally, and instead npm never exits -- the packages get installed, but I just see a spinner in the terminal forever. I did not have any issues in CI prior to the release of Node.js v22.5.0. When I use Node.js v20.12.2 and npm v10.8.2 locally, installation completes successfully. Thus, I think some change in Node.js v22.5.0 must be related.
Here's a log file from the error happening in GitHub Actions: 2024-07-17T17_07_43_972Z-debug-0.log. This came from the following run: https://github.com/divviup/divviup-api/actions/runs/9978466717/job/27575428716?pr=1178
Expected Behavior
npm ci
should succeed and exit cleanly.Steps To Reproduce
git clone https://github.com/divviup/divviup-api.git
cd divviup-api/app
git checkout 3edafaefe90795387db3e35a161f3110c3ac3dea
npm ci
Environment
The text was updated successfully, but these errors were encountered: