-
Notifications
You must be signed in to change notification settings - Fork 5
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
PSA: If you're on node 20.0.0
and above, and want to use this library with client.configuration.connection.secure === true
, use the argument --no-network-family-autoselection
#13
Comments
Ok, I've looked into this issue a bit more, and it seems to only occur when client.configuration.connection.secure === true && client.configuration.connection.method === `tcp` If you make a very smol connection to tmi over tcp: import { connect } from 'net'
const xd = connect(6667, `irc.chat.twitch.tv`, () => console.log(`connected`))
xd
.setEncoding(`utf8`)
.setNoDelay()
.on(`connect`, () => xd.write(`nick justinfan123\njoin #tmiloadtesting2\n`))
.on(`data`, _ => console.log(_)) It doesn't exhibit the issue either Oddly enough, doing the same thing securely is working fine for me import { TLSSocket } from 'tls'
const xd = new TLSSocket()
.connect(6697, `irc.chat.twitch.tv`, () => console.log(`connected`))
xd
.setEncoding(`utf8`)
.setNoDelay()
.on(`connect`, () => xd.write(`nick justinfan123\njoin #tmiloadtesting2\n`))
.on(`data`, _ => console.log(_)) |
@brian6932 To clarify, does 20.3.0 still result in the same |
yes node:internal/assert:14
throw new ERR_INTERNAL_ASSERTION(message);
^
NotSpecified: (:) [], RemoteException
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
NotSpecified: (:) [], RemoteException
at new NodeError (node:internal/errors:405:5)
at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1106:3)
at Timeout.internalConnectMultipleTimeout (node:net:1644:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {
code: 'ERR_INTERNAL_ASSERTION'
}
NotSpecified: (:) [], RemoteException
Node.js v20.3.0 |
@brian6932 I cannot reproduce this on Node.js 20.3.0. |
|
Ok, another question: can you please provide the entire file (or a meaningful repro) that you're trying to execute? |
@ShogunPanda https://github.com/pajlada/brian-test-repro You can use this
As explained here, if secure is true (default), and tcp is the method (default), it will produce the error |
A more minimal example // index.mjs
import { Socket } from "net";
import { TLSSocket } from "tls";
const port = 6697;
const host = "irc.chat.twitch.tv";
const backingSocket = new Socket();
const stream = new TLSSocket(backingSocket);
backingSocket.connect(port, host);
stream.connect(port, host); then Host and port can be changed too and it still happens. I tested with port set to And confirmed it works with |
Hello! |
Hello. The fix for this is in the PR above. |
PR-URL: #48464 Fixes: npm/cli#6409 Fixes: KararTY/dank-twitch-irc#13 Fixes: #47644 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: #48464 Fixes: npm/cli#6409 Fixes: KararTY/dank-twitch-irc#13 Fixes: #47644 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Seems fixed in |
PR-URL: nodejs#48464 Fixes: npm/cli#6409 Fixes: KararTY/dank-twitch-irc#13 Fixes: nodejs#47644 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: nodejs#48464 Fixes: npm/cli#6409 Fixes: KararTY/dank-twitch-irc#13 Fixes: nodejs#47644 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
@ShogunPanda I have once again received this error. My internet connection at the moment is pretty messed up, so things are timing out, and I suspect that this error is actually taking the place of a socket timeout error.
|
@brian6932 Were you connecting via TLS or just plain socket? |
@brian6932 Were you using TLS? |
I was using a WebSocket over TLS @ShogunPanda Configuration client.configuration.connection.secure === true && client.configuration.connection.type === `websocket` |
Amazing, I have a lead then. I'll try to see what I can do. Thanks sir! |
I have received this multiple times today, and can't blame my internet this time around node:internal/assert:14
throw new ERR_INTERNAL_ASSERTION(message);
^
NotSpecified: (:) [], RemoteException
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
NotSpecified: (:) [], RemoteException
at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {
code: 'ERR_INTERNAL_ASSERTION'
}
NotSpecified: (:) [], RemoteException
Node.js v21.1.0 |
@brian6932 which hosts were you connecting to? How are they resolved from the source host (in other words, can you please post the results of a DNS query from the source host?) I don't need them to be real data, but I just need to understand the DNS configuration. |
@ShogunPanda like a dig?
|
Yes, exactly. Thanks, I'll look it up! |
@ShogunPanda Looks like I've gotten it with client.configuration.connection.secure === true && client.configuration.connection.type === `tcp` as well this time. node:internal/assert:14
throw new ERR_INTERNAL_ASSERTION(message);
^
NotSpecified: (:) [], RemoteException
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
NotSpecified: (:) [], RemoteException
at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7) {
code: 'ERR_INTERNAL_ASSERTION'
}
NotSpecified: (:) [], RemoteException
Node.js v21.4.0 So I'll reopen this issue, but make it more general, and say that it's pretty rare. dig for
|
20.0.0
and above, and want to use this library over tcp, use the argument --no-network-family-autoselection
20.0.0
and above, and want to use this library with client.configuration.connection.secure === true
, use the argument --no-network-family-autoselection
Thanks! |
Connecting over ws is unaffectedThis is relatively rare now, but eventually, you'll get the following error:
The text was updated successfully, but these errors were encountered: