You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our app, we fetch multiple time an external endpoint, to do that smoothly everything is throttled on our side. I've double check If not throttled and concurrency is high we can fetch let say 400 external call without any issue. However when delaying those same request and throtthling this error happens.
I was able to repro this from my codebase, but I am unable to repro that isolated.
Also I slightly modified the undici package line 1073 and just skip the statement if kParser is not defined and it just work. It seems undici is smart enough to reconnect the client if a disconnection occur as well further down the line. So it might be a fix.
if anyone is able to repro what I'm describing glad to have a repro link.
I'm also going to open a pr for that, let me know if it meet your requirements.
In our app we are doing something very similar to that:
Undici should not throw an error if kParser is not defined when calling the readMore() function OR should prevent calling the parent function when kParser is presumably not defined
Logs & Screenshots
/usr/src/app/node_modules/undici/lib/client.js:1073
parser.readMore()
^
TypeError: Cannot read properties of undefined (reading 'readMore')
at TLSSocket.onSocketReadable (/usr/src/app/node_modules/undici/lib/client.js:1073:10)
at TLSSocket.emit (node:events:514:28)
at emitReadable_ (node:internal/streams/readable:590:12)
at onEofChunk (node:internal/streams/readable:568:5)
at readableAddChunk (node:internal/streams/readable:275:5)
at Readable.push (node:internal/streams/readable:234:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:232:12)
Environment
node: v18.17.0
OS: mac OS 13.4.1 (c) (22F770820d), but also happen in deployed linux environment
The text was updated successfully, but these errors were encountered:
Bug Description
Hello,
In our app, we fetch multiple time an external endpoint, to do that smoothly everything is throttled on our side. I've double check If not throttled and concurrency is high we can fetch let say 400 external call without any issue. However when delaying those same request and throtthling this error happens.
I was able to repro this from my codebase, but I am unable to repro that isolated.
Also I slightly modified the undici package line 1073 and just skip the statement if kParser is not defined and it just work. It seems undici is smart enough to reconnect the client if a disconnection occur as well further down the line. So it might be a fix.
if anyone is able to repro what I'm describing glad to have a repro link.
I'm also going to open a pr for that, let me know if it meet your requirements.
In our app we are doing something very similar to that:
Expected Behavior
Undici should not throw an error if kParser is not defined when calling the readMore() function OR should prevent calling the parent function when kParser is presumably not defined
Logs & Screenshots
Environment
node: v18.17.0
OS: mac OS 13.4.1 (c) (22F770820d), but also happen in deployed linux environment
The text was updated successfully, but these errors were encountered: