Bug Description
When we allowH2 on our canary prod deployment, the process is inevitably going to crash on 8.4.x.
I can't remember if I tested on 8.3, but previous 8.x releases did not crash.
Reproducible By
Not entirely sure, but we only get that crash when we toggle allowH2 explictly (disabled otherwise and doesn't crash).
We use undici.request and a pre-configured Agent.
Expected Behavior
No crashes when enabling HTTP/2.
Logs & Screenshots
Process crashing with:
/usr/src/app/node_modules/undici/lib/core/util.js:843
request.onResponseError(err)
^
TypeError: Cannot read properties of null (reading 'onResponseError')
at Object.errorRequest (/usr/src/app/node_modules/undici/lib/core/util.js:843:13)
at /usr/src/app/node_modules/undici/lib/dispatcher/client.js:398:14
at new Promise (<anonymous>)
at [destroy] (/usr/src/app/node_modules/undici/lib/dispatcher/client.js:394:12)
at Client.destroy (/usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:145:19)
at /usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:109:14
at new Promise (<anonymous>)
at Client.destroy (/usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:108:14)
at /usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:97:24
at runNextTicks (node:internal/process/task_queues:65:5)
Emitted 'error' event on Client instance at:
at Object.errorRequest (/usr/src/app/node_modules/undici/lib/core/util.js:846:12)
at /usr/src/app/node_modules/undici/lib/dispatcher/client.js:398:14
at new Promise (<anonymous>)
at [destroy] (/usr/src/app/node_modules/undici/lib/dispatcher/client.js:394:12)
at Client.destroy (/usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:145:19)
at /usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:109:14
at new Promise (<anonymous>)
at Client.destroy (/usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:108:14)
at /usr/src/app/node_modules/undici/lib/dispatcher/dispatcher-base.js:97:24
at runNextTicks (node:internal/process/task_queues:65:5)
Node.js v26.3.0
Environment
Undici v8.4.1
Node v26.3.0 (distroless container)
Additional context
Bug Description
When we
allowH2on our canary prod deployment, the process is inevitably going to crash on 8.4.x.I can't remember if I tested on 8.3, but previous 8.x releases did not crash.
Reproducible By
Not entirely sure, but we only get that crash when we toggle
allowH2explictly (disabled otherwise and doesn't crash).We use
undici.requestand a pre-configuredAgent.Expected Behavior
No crashes when enabling HTTP/2.
Logs & Screenshots
Process crashing with:
Environment
Undici v8.4.1
Node v26.3.0 (distroless container)
Additional context