Skip to content
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

Error: read ECONNRESET for Nodejs 20.3.0 (Never successful from this version) #4181

Open
SEWeiTung opened this issue Jun 11, 2023 · 5 comments

Comments

@SEWeiTung
Copy link

SEWeiTung commented Jun 11, 2023

Details

Successfully on:

14.x (Windows, Ubunto, Mac), 16.x (Windows, Ubunto, Mac), 18.x (Windows, Ubunto, Mac) and 20.3.0 (Windows).

Failed on:

20.3.0 (Ubunto and Mac).

image


For more, please see: https://github.com/MaledongGit/egg/actions/runs/5234494571/jobs/9450695057

Node.js version

20.3.0

Example code

In the unit test:

        app.httpRequest()
          .get('/__koa_mock_scene_toolbox/hello')
          .expect(404, done);

if we ignored the snippet of codes above, the test can pass.

However even if I tried 3 or more times, it always gets me wrong. So please ignore this comment.

Operating system

Ubunto and Mac (with the latest version on GitHub for unit tests)

Scope

SEWeiTung/egg@25f2147

(This is a 3-rd party repo and I've pasted the unit test part).

Module and version

No response


PS: I've seen such issues many times after searching in Node, however mine is DIFF from others in:

Other people may meet this problem by accident, but I met this problem this morning and tested several times, it always got me mad with the "failed" test.

Only the specific kind of version of Nodejs, as well as Linux or Mac.

Is there anything changed or ……?

Notice:This issue can be temporarily solved by adding "await" at each request, which means eash request MUST BE waiting for the resp of the app, and then everything gets fine....

@miles170
Copy link

Have you found a workaround?

@SEWeiTung
Copy link
Author

Have you found a workaround?

This issue can be temporarily solved by adding "await" at each request, which means eash request MUST BE waiting for the resp of the app, and then everything gets fine....

@hermanbanken
Copy link

We just also found this bug, and it seems to be introduced in this specific release.

I bisected:

node 16 works
node 18 works
node 19 works
node 20.0 works
node 20.2 works
=====
node 20.3 broken
node 20.6 broken
node 20.12 broken

But I'm not familiar with NodeJS internals, and the changelog (https://nodejs.org/en/blog/release/v20.3.0) isn't point out clear causes. I'm thinking maybe any of these:

  • [bfcb3d1d9a] - deps: upgrade to libuv 1.45.0, including significant performance improvements to file system operations on Linux (Santiago Gimeno) #48078
  • [d3e3a911fd] - deps: update nghttp2 to 1.53.0 (Node.js GitHub Bot) #47997

@hermanbanken
Copy link

Related to ladjs/supertest#709 (comment). But I still don't know why this behaviour is introduced in Node 20.3. Something seems to disallow "many" (3?) connections, or concurrent servers. Setting maxConnections to 1 causes my tests to fail even earlier (after 1/6 supertest's instead of 3/6), but setting it to maxConnections > 3 doesn't increase the amount of tests working past 3.

@RedYetiDev
Copy link
Member

Hi! Can you reproduce on the latest version of v20 with no dependencies? Also, is this only occurring in Gh actions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants