undici: HTTPParserError: Expected HTTP
Got this error while running master on our test setup.
"HTTPParserError: Expected HTTP/\n at Parser.[kMakeError] (/usr/src/app/node_modules/undici/lib/llhttp/parser.js:264:12)\n at Parser.execute (/usr/src/app/node_modules/undici/lib/llhttp/parser.js:246:31)\n at Socket.onSocketData (/usr/src/app/node_modules/undici/lib/client.js:793:17)\n at Socket.emit (node:events:369:20)\n at Socket.Readable.read (node:internal/streams/readable:524:10)\n at Socket.read (node:net:622:10)\n at flow (node:internal/streams/readable:1006:34)\n at resume_ (node:internal/streams/readable:987:3)\n at processTicksAndRejections (node:internal/process/task_queues:81:21)"
Source is a Node 15 server. So it’s either an undici or node bug.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (20 by maintainers)
Commits related to this issue
- fix: use separate web assembly instance for every Client Refs: https://github.com/nodejs/undici/issues/682 Refs: https://github.com/nodejs/undici/issues/659 — committed to nodejs/undici by ronag 3 years ago
- fix: use separate web assembly instance for every Client (#687) * fix: use separate web assembly instance for every Client Refs: https://github.com/nodejs/undici/issues/682 Refs: https://github.c... — committed to nodejs/undici by ronag 3 years ago
- fix: use separate web assembly instance for every Client (#687) * fix: use separate web assembly instance for every Client Refs: https://github.com/nodejs/undici/issues/682 Refs: https://github.c... — committed to crysmags/undici by ronag 3 years ago
I’ll see if I can access the production system during some night this week when it’s under less use and see if I can get more data points.
fastify-reply-from has all sort of edge cases covered, I’ll try to see if this shows up there.
Overall I would recommend @ronag to try to isolate a repro - so we can work on a fix.
I need to try to reproduce it somewhere else. It wasn’t the test setup it was another setup used in production and I can’t do debugging there. So it might be a bit tricky / take a while. I’ll also try to help reviewing the code and see if I can find anything obvious.
It must be the parser then
Not that I can think of… the error is gone now that I’ve reverted back to 3.x.
Maybe?
Sorry I can’t be more helpful atm.