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

--enable-network-family-autoselection causes ERR_INTERNAL_ASSERTION with fetch() in REPL #46670

Closed
tniessen opened this issue Feb 15, 2023 · 1 comment
Labels
confirmed-bug Issues with confirmed bugs. fetch Issues and PRs related to the Fetch API net Issues and PRs related to the net subsystem.

Comments

@tniessen
Copy link
Member

Version

v19.6.0

Platform

node:latest docker image on Linux 5.15.91-1-MANJARO x86_64 GNU/Linux

Subsystem

fetch/net/repl?

What steps will reproduce the bug?

$ docker run --rm -it node:latest --enable-network-family-autoselection
Welcome to Node.js v19.6.0.
Type ".help" for more information.
> await fetch('http://<redacted>/')
Uncaught TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:12789:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async REPL5:1:33 {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:8236:28)
      at node:internal/deps/undici/undici:8194:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:8225:13)
      at process.processImmediate (node:internal/timers:475:21)
      at process.topLevelDomainCallback (node:domain:161:15)
      at process.callbackTrampoline (node:internal/async_hooks:128:24) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}
> Uncaught:
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 __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at new NodeError (node:internal/errors:399:5)
    at assert (node:internal/assert:14:11)
    at internalConnectMultiple (node:net:1070:3)
    at afterConnectMultiple (node:net:1532:5)
    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
  code: 'ERR_INTERNAL_ASSERTION'
}
> Uncaught:
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 __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at new NodeError (node:internal/errors:399:5)
    at assert (node:internal/assert:14:11)
    at internalConnectMultiple (node:net:1070:3)
    at afterConnectMultiple (node:net:1532:5)
    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
  code: 'ERR_INTERNAL_ASSERTION'
}
>

How often does it reproduce? Is there a required condition?

It appears to reproduce every time when none of the target IPs are reachable, but only in the REPL. (It's possible that it also happens without the REPL, but I haven't seen it anywhere else yet.)

What is the expected behavior?

No ERR_INTERNAL_ASSERTION.

What do you see instead?

ERR_INTERNAL_ASSERTION.

Additional information

The DNS setup within the network appears to be rather complicated, and the error message fetch failed is expected when the network node cannot be reached via any of the associated A or AAAA records. However, the ERR_INTERNAL_ASSERTION error is unexpected.

@tniessen tniessen added net Issues and PRs related to the net subsystem. fetch Issues and PRs related to the Fetch API labels Feb 15, 2023
@tniessen tniessen added the confirmed-bug Issues with confirmed bugs. label Feb 17, 2023
@tniessen
Copy link
Member Author

I'm closing this as a duplicate of #46669 even though the reproduction in this issue is simpler. (cc @ShogunPanda)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. fetch Issues and PRs related to the Fetch API net Issues and PRs related to the net subsystem.
Projects
None yet
Development

No branches or pull requests

1 participant