Title: Tests broken with externalized undici · Issue #58865 · nodejs/node · GitHub
Open Graph Title: Tests broken with externalized undici · Issue #58865 · nodejs/node
X Title: Tests broken with externalized undici · Issue #58865 · nodejs/node
Description: Version 24.3.0, 22.17.0 Platform Linux Subsystem No response What steps will reproduce the bug? To reproduce: Clone https://github.com/nodejs/undici. Build undici with EXTERNAL_PATH environment variable set. e.g. EXTERNAL_PATH=/home/rlau...
Open Graph Description: Version 24.3.0, 22.17.0 Platform Linux Subsystem No response What steps will reproduce the bug? To reproduce: Clone https://github.com/nodejs/undici. Build undici with EXTERNAL_PATH environment var...
X Description: Version 24.3.0, 22.17.0 Platform Linux Subsystem No response What steps will reproduce the bug? To reproduce: Clone https://github.com/nodejs/undici. Build undici with EXTERNAL_PATH environment var...
Opengraph URL: https://github.com/nodejs/node/issues/58865
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Tests broken with externalized undici","articleBody":"### Version\n\n24.3.0, 22.17.0\n\n### Platform\n\n```text\nLinux\n```\n\n### Subsystem\n\n_No response_\n\n### What steps will reproduce the bug?\n\nTo reproduce:\n1. Clone https://github.com/nodejs/undici.\n2. Build undici with `EXTERNAL_PATH` environment variable set. e.g. \n```console\nEXTERNAL_PATH=/home/rlau/sandbox/github/undici node build/wasm.js --docker\n```\n3. Delete `deps/undici` from Node.js (downstream builders such as Fedora do this to ensure the externalized version of undici is being used instead of the in-tree copy in Node.js).\n4. Configure Node.js to use the externalized undici from step 2 (note that `loader.js` is generated during step 2.).\n```\n./configure --shared-builtin-undici/undici-path /home/rlau/sandbox/github/undici/loader.js\n```\n5. Build Node.js and run tests.\n\n\n\n### How often does it reproduce? Is there a required condition?\n\nEvery time\n\n### What is the expected behavior? Why is that the expected behavior?\n\nTests pass on all supported release lines of Node.js.\n\n### What do you see instead?\n\nFor Node.js 22, this test fails:\nhttps://github.com/nodejs/undici/actions/runs/15926591410/job/44925161073\n```console\n=== release test-inspector-network-fetch ===\nPath: parallel/test-inspector-network-fetch\n--- stderr ---\nDebugger listening on ws://127.0.0.1:43805/7add9ccb-dd3b-471d-bf52-d3b5e0431cc1\nFor help, see: https://nodejs.org/en/docs/inspector\nnode:internal/modules/cjs/loader:1404\n throw err;\n ^\n\nError: Cannot find module '../../deps/undici/src/index.js'\nRequire stack:\n- /home/runner/work/undici/undici/node-v22.17.0/test/parallel/test-inspector-network-fetch.js\n at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)\n at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)\n at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)\n at Function._load (node:internal/modules/cjs/loader:1211:37)\n at TracingChannel.traceSync (node:diagnostics_channel:322:14)\n at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)\n at Module.require (node:internal/modules/cjs/loader:1487:12)\n at require (node:internal/modules/helpers:135:16)\n at Object.\u003canonymous\u003e (/home/runner/work/undici/undici/node-v22.17.0/test/parallel/test-inspector-network-fetch.js:15:16)\n at Module._compile (node:internal/modules/cjs/loader:1730:14) {\n code: 'MODULE_NOT_FOUND',\n requireStack: [\n '/home/runner/work/undici/undici/node-v22.17.0/test/parallel/test-inspector-network-fetch.js'\n ]\n}\n\nNode.js v22.17.0\nCommand: out/Release/node --inspect=0 --experimental-network-inspection --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/runner/work/undici/undici/node-v22.17.0/test/parallel/test-inspector-network-fetch.js\n```\n\nFor Node.js 24,\nhttps://github.com/nodejs/undici/actions/runs/15926591410/job/44925161078\n```console\n=== release test-http-proxy-fetch ===\nPath: parallel/test-http-proxy-fetch\n--- stderr ---\nnode:internal/process/promises:394\n triggerUncaughtException(err, true /* fromPromise */);\n ^\n\nAssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:\n+ actual - expected\n\n {\n+ code: 1,\n- code: 0,\n signal: null,\n+ stderr: 'node:internal/assert:11\\n' +\n+ ' throw new ERR_INTERNAL_ASSERTION(message);\\n' +\n+ ' ^\\n' +\n+ '\\n' +\n+ 'Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.\\n' +\n+ 'Please open an issue with this stack trace at https://github.com/nodejs/node/issues\\n' +\n+ '\\n' +\n+ ' at assert (node:internal/assert:11:11)\\n' +\n+ ' at setupUserModules (node:internal/process/pre_execution:187:3)\\n' +\n+ ' at prepareExecution (node:internal/process/pre_execution:159:5)\\n' +\n+ ' at prepareMainThreadExecution (node:internal/process/pre_execution:46:10)\\n' +\n+ ' at node:internal/main/run_main_module:15:19 {\\n' +\n+ \" code: 'ERR_INTERNAL_ASSERTION'\\n\" +\n+ '}\\n' +\n+ '\\n' +\n+ 'Node.js v24.3.0',\n+ stdout: ''\n- stderr: '',\n- stdout: 'Hello world'\n }\n\n at exports.checkProxiedRequest (/home/runner/work/undici/undici/node-v24.3.0/test/common/proxy-server.js:89:10)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async /home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-http-proxy-fetch.js:39:3 {\n generatedMessage: true,\n code: 'ERR_ASSERTION',\n actual: {\n stderr: 'node:internal/assert:11\\n' +\n ' throw new ERR_INTERNAL_ASSERTION(message);\\n' +\n ' ^\\n' +\n '\\n' +\n 'Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.\\n' +\n 'Please open an issue with this stack trace at https://github.com/nodejs/node/issues\\n' +\n '\\n' +\n ' at assert (node:internal/assert:11:11)\\n' +\n ' at setupUserModules (node:internal/process/pre_execution:187:3)\\n' +\n ' at prepareExecution (node:internal/process/pre_execution:159:5)\\n' +\n ' at prepareMainThreadExecution (node:internal/process/pre_execution:46:10)\\n' +\n ' at node:internal/main/run_main_module:15:19 {\\n' +\n \" code: 'ERR_INTERNAL_ASSERTION'\\n\" +\n '}\\n' +\n '\\n' +\n 'Node.js v24.3.0',\n stdout: '',\n code: 1,\n signal: null\n },\n expected: { stderr: '', code: 0, signal: null, stdout: 'Hello world' },\n operator: 'deepStrictEqual'\n}\n\nNode.js v24.3.0\nCommand: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-http-proxy-fetch.js\n=== release test-https-proxy-fetch ===\nPath: parallel/test-https-proxy-fetch\n--- stderr ---\nnode:internal/process/promises:394\n triggerUncaughtException(err, true /* fromPromise */);\n ^\n\nAssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:\n+ actual - expected\n\n {\n+ code: 1,\n- code: 0,\n signal: null,\n+ stderr: 'node:internal/assert:11\\n' +\n+ ' throw new ERR_INTERNAL_ASSERTION(message);\\n' +\n+ ' ^\\n' +\n+ '\\n' +\n+ 'Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.\\n' +\n+ 'Please open an issue with this stack trace at https://github.com/nodejs/node/issues\\n' +\n+ '\\n' +\n+ ' at assert (node:internal/assert:11:11)\\n' +\n+ ' at setupUserModules (node:internal/process/pre_execution:187:3)\\n' +\n+ ' at prepareExecution (node:internal/process/pre_execution:159:5)\\n' +\n+ ' at prepareMainThreadExecution (node:internal/process/pre_execution:46:10)\\n' +\n+ ' at node:internal/main/run_main_module:15:19 {\\n' +\n+ \" code: 'ERR_INTERNAL_ASSERTION'\\n\" +\n+ '}\\n' +\n+ '\\n' +\n+ 'Node.js v24.3.0',\n+ stdout: ''\n- stderr: '',\n- stdout: 'Hello world'\n }\n\n at exports.checkProxiedRequest (/home/runner/work/undici/undici/node-v24.3.0/test/common/proxy-server.js:89:10)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async /home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-https-proxy-fetch.js:43:3 {\n generatedMessage: true,\n code: 'ERR_ASSERTION',\n actual: {\n stderr: 'node:internal/assert:11\\n' +\n ' throw new ERR_INTERNAL_ASSERTION(message);\\n' +\n ' ^\\n' +\n '\\n' +\n 'Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.\\n' +\n 'Please open an issue with this stack trace at https://github.com/nodejs/node/issues\\n' +\n '\\n' +\n ' at assert (node:internal/assert:11:11)\\n' +\n ' at setupUserModules (node:internal/process/pre_execution:187:3)\\n' +\n ' at prepareExecution (node:internal/process/pre_execution:159:5)\\n' +\n ' at prepareMainThreadExecution (node:internal/process/pre_execution:46:10)\\n' +\n ' at node:internal/main/run_main_module:15:19 {\\n' +\n \" code: 'ERR_INTERNAL_ASSERTION'\\n\" +\n '}\\n' +\n '\\n' +\n 'Node.js v24.3.0',\n stdout: '',\n code: 1,\n signal: null\n },\n expected: { stderr: '', code: 0, signal: null, stdout: 'Hello world' },\n operator: 'deepStrictEqual'\n}\n\nNode.js v24.3.0\nCommand: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-https-proxy-fetch.js\n=== release test-inspector-network-fetch ===\nPath: parallel/test-inspector-network-fetch\n--- stderr ---\nDebugger listening on ws://127.0.0.1:42081/5b84e2a3-7770-4357-8970-7a0a5f457a0f\nFor help, see: https://nodejs.org/en/docs/inspector\nnode:internal/modules/cjs/loader:1372\n throw err;\n ^\n\nError: Cannot find module '../../deps/undici/src/index.js'\nRequire stack:\n- /home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-inspector-network-fetch.js\n at Module._resolveFilename (node:internal/modules/cjs/loader:1369:15)\n at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)\n at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)\n at Module._load (node:internal/modules/cjs/loader:1179:37)\n at TracingChannel.traceSync (node:diagnostics_channel:322:14)\n at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)\n at Module.require (node:internal/modules/cjs/loader:1449:12)\n at require (node:internal/modules/helpers:135:16)\n at Object.\u003canonymous\u003e (/home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-inspector-network-fetch.js:15:16)\n at Module._compile (node:internal/modules/cjs/loader:16[92](https://github.com/nodejs/undici/actions/runs/15926591410/job/44925161078#step:13:93):14) {\n code: 'MODULE_NOT_FOUND',\n requireStack: [\n '/home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-inspector-network-fetch.js'\n ]\n}\n\nNode.js v24.3.0\nCommand: out/Release/node --inspect=0 --experimental-network-inspection --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /home/runner/work/undici/undici/node-v24.3.0/test/parallel/test-inspector-network-fetch.js\n```\n\ni.e.\n- parallel/test-http-proxy-fetch.js (Node.js 24)\n- parallel/test-https-proxy-fetch.js (Node.js 24)\n- parallel/test-inspector-network-fetch.js (Node.js 22, 24)\n\n### Additional information\n\nWhen building Node.js with an externalized copy of undici, some tests fail. This was noticed on https://github.com/nodejs/undici/: https://github.com/nodejs/undici/pull/4276\n\ne.g. https://github.com/nodejs/undici/actions/runs/15926591410","author":{"url":"https://github.com/richardlau","@type":"Person","name":"richardlau"},"datePublished":"2025-06-27T15:49:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/58865/node/issues/58865"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3e67c62a-3b62-deca-509e-2330b5db6ed7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80AC:1BB557:EA049:13A22B:6A4C209D |
| html-safe-nonce | 7c9ce74d34937d7765c15601af8bb129e2584152f2a0aa771ae2ca317692c731 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEFDOjFCQjU1NzpFQTA0OToxM0EyMkI6NkE0QzIwOUQiLCJ2aXNpdG9yX2lkIjoiMTIzMTQzNTg5MjI2Nzk1MDIzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 865f2ece250634dfa182155ba0c6371ebe4898ca936de915ae9e7da38c51b2e6 |
| hovercard-subject-tag | issue:3183278040 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/58865/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b76f7f25a8a05fd749931d5da566a148a691c0c96db25906465d338612d09a2/nodejs/node/issues/58865 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b76f7f25a8a05fd749931d5da566a148a691c0c96db25906465d338612d09a2/nodejs/node/issues/58865 |
| og:image:alt | Version 24.3.0, 22.17.0 Platform Linux Subsystem No response What steps will reproduce the bug? To reproduce: Clone https://github.com/nodejs/undici. Build undici with EXTERNAL_PATH environment var... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | richardlau |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f95fb36c72adc940ff991c03531114b2245658d0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width