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

Nightly tests are failing #3464

Open
github-actions bot opened this issue Aug 16, 2024 · 24 comments
Open

Nightly tests are failing #3464

github-actions bot opened this issue Aug 16, 2024 · 24 comments

Comments

@github-actions
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Tests against nightly failed, see: https://github.com/nodejs/undici/actions/runs/10418179441

@KhafraDev
Copy link
Member

@metcoder95

 test at test/http2.js:370:1
✖ [v20] Request should fail if allowH2 is false and server advertises h1 only (8.785301ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + '80E807C2167F0000:error:0A000460:SSL routines:ssl3_read_bytes:tlsv1 alert no application protocol:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1605:SSL alert number 120\n'
  - 'Client network socket disconnected before secure TLS connection was established'
      at res.<computed> [as strictEqual] (/home/runner/work/undici/undici/node_modules/@matteo.collina/tspl/tspl.js:52:35)
      at TestContext.<anonymous> (/home/runner/work/undici/undici/test/http2.js:408:9)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async Test.run (node:internal/test_runner/test:879:9)
      at async Test.processPendingSubtests (node:internal/test_runner/test:590:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: '80E807C2167F0000:error:0A000460:SSL routines:ssl3_read_bytes:tlsv1 alert no application protocol:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1605:SSL alert number 120\n',
    expected: 'Client network socket disconnected before secure TLS connection was established',
    operator: 'strictEqual'
  }

Copy link
Contributor Author

Tests against nightly failed, see: https://github.com/nodejs/undici/actions/runs/10431397022

Copy link
Contributor Author

Tests against nightly failed, see: https://github.com/nodejs/undici/actions/runs/10439694412

@metcoder95
Copy link
Member

I'll take a look later this week, maybe we can skip it for now; did something changed within the OpenSSL that is causing that failure on nightly?

@RafaelGSS
Copy link
Member

@KhafraDev by the test name (v20) shouldn't it execute only on v20.x?

@KhafraDev
Copy link
Member

It executes on versions >= 20

{ skip: !isGreaterThanv20 },

@RafaelGSS
Copy link
Member

RafaelGSS commented Aug 21, 2024

Is this failing on the nightly build only (nodejs#main) or has it failed since Node.js 22.6.0?

@metcoder95
Copy link
Member

Only on the nightly. It seems related to the way OpenSSL handles the missing of ALPN response. Tried to do bisect Today but didn’t have the time.

@metcoder95
Copy link
Member

Did something changed on that regard for v23?

@RafaelGSS
Copy link
Member

Can someone test it using the v22.7.0-proposal but removing nodejs/node@a8c78c6 and nodejs/node@df3e6bb?

@KhafraDev
Copy link
Member

I'm sorry I don't have any time to test.

@RafaelGSS
Copy link
Member

I can confirm dropping OpenSSL update passes the test. I'll remove it for the next release and for main branch. Let's discuss the reason in the PR.

@RafaelGSS
Copy link
Member

nodejs/node#54491

@RafaelGSS
Copy link
Member

It seems undici needs to update its test suite for Node.js 22.8.0 (nodejs/node#54491 (comment))

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 21, 2024

Why though?

Doesnt it need to be wrapped again in nodejs, as it is done before?

https://github.com/nodejs/node/blob/8b0c699f2aafdf81bc4834b9bd2a4923741d3a6f/lib/_tls_wrap.js#L1732

Now we get the openssl warning directly.

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 22, 2024

@RafaelGSS

Please see
nodejs/node#54492

With that PR the undici tests pass again.

@metcoder95
Copy link
Member

It seems undici needs to update its test suite for Node.js 22.8.0 (nodejs/node#54491 (comment))

This might depend on the outcome of this new behaviour from OpenSSL, isn't it?
If moving forward with the update, we will need to at least document this gotcha when attempting to use ALPN

@RafaelGSS
Copy link
Member

I might not be the best person to discuss it, but looks like not wrapping it on Node.js would make more sense, it gives the library the ability to decide what to do on OpenSSL error codes. As mentioned by Richard, this is a bug fix from OpenSSL, but I can see why this is problematic as it can be considered semver-major on error code changes.

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 22, 2024

Just one argument for the wrapping is that ECONNRESET is a posix error and ERR_SSL_WRONG_VERSION_NUMBER not.

@RafaelGSS
Copy link
Member

@richardlau what's your thought on this? I don't think we can hold the OpenSSL update for too long. Our choice is either accept nodejs/node#54492 as an expected approach or clarify that users should rely on OpenSSL error codes.

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 27, 2024

Also keep in mind the error has the very descriptive error message
0E807C2167F0000:error:0A000460:SSL routines:ssl3_read_bytes:tlsv1 alert no application protocol:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1605:SSL alert number 120\n

@metcoder95
Copy link
Member

From the perspective of the issue, I'd like to rely on OpenSSL error codes if they were more descriptive compared to what currently throws.

The wrap made by @Uzlopak seems like a good step forward but it might require a wider consensus (I guess?)

@Uzlopak
Copy link
Contributor

Uzlopak commented Oct 19, 2024

ugh...

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