You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Internal error in http2 with checkServerIdentity undefined #49839
Important is that checkServerIdentity is undefined.
It says then:
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at new NodeError (node:internal/errors:405:5)
at assert (node:internal/assert:14:11)
at Object.connect (node:_tls_wrap:1684:3)
at connect (node:internal/http2/core:3298:22)
at Http2WebTransportClient.createTransport (file:///workspaces/webtransport/lib/http2/client.js:57:22)
at HttpClient.transportIntSwitchToReliable (file:///workspaces/webtransport/lib/transport.js:129:35)
at file:///workspaces/webtransport/lib/webtransport.js:70:18 {
code: 'ERR_INTERNAL_ASSERTION'
}
and I am just filling it, since node.js asked me to.
I assume it can be easily worked around by not having checkServerIdentity in the object, when not used.
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
Thanks, of course, I did something like this. But as I wrote, I just filed the issue, as node.js asked me too. ("Please open an issue with this stack trace at") I assume, that the intention is, that it is either correctly handled or an meaningful error is thrown.
@martenrichter Thank you for your report. As you mentioned, need to throw ERR_INVALID_ARG_TYPE instead of ERR_INTERNAL_ASSERTION for this case. I created PR(#49896).
Activity
ishan-18 commentedon Sep 26, 2023
Try doing this:
`const options = {
settings: {
enableConnectProtocol: true
},
localPort: this.localPort
};
if (checkServerIdentity) {
options.checkServerIdentity = checkServerIdentity;
}
this.clientInt = connect('https://' + this.hostname + ':' + this.port, options);
`
martenrichter commentedon Sep 27, 2023
Thanks, of course, I did something like this. But as I wrote, I just filed the issue, as node.js asked me too. ("Please open an issue with this stack trace at") I assume, that the intention is, that it is either correctly handled or an meaningful error is thrown.
tls: use validateFunction for `options.checkServerIdentity`
deokjinkim commentedon Sep 30, 2023
@martenrichter Thank you for your report. As you mentioned, need to throw
ERR_INVALID_ARG_TYPEinstead ofERR_INTERNAL_ASSERTIONfor this case. I created PR(#49896).tls: use validateFunction for `options.checkServerIdentity`
tls: use validateFunction for `options.checkServerIdentity`