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
The error probably occurs when the TCP connection is closed before the request body is fully read. Example error:
BadResource: Bad resource ID
at readableStreamCollectIntoUint8Array (ext:deno_web/06_streams.js:1060:23)
at InnerBody.consume (ext:deno_fetch/22_body.js:163:14)
at consumeBody (ext:deno_fetch/22_body.js:255:34)
at Request.text (ext:deno_fetch/22_body.js:351:16)
at file:///<...>/server.ts:1:50
at ext:deno_http/00_serve.ts:382:26
at ext:deno_http/00_serve.ts:573:33
at eventLoopTick (ext:core/01_core.js:175:7) {
name: "BadResource"
}
A Wireshark capture of a failed request shows the client closing the connection immediately after sending a POST request.
Version: deno 2.1.1 (stable, release, x86_64-unknown-linux-gnu)
The following Deno server code produces seemingly random
BadResource: Bad resource ID
errors:Observed Behavior
The error probably occurs when the TCP connection is closed before the request body is fully read. Example error:
A Wireshark capture of a failed request shows the client closing the connection immediately after sending a POST request.
Expected Behavior
The server should not throw an error or throw a more descriptive error.
Context
I encountered this error while load testing my Deno server using wrk. The error occurred only on the end of a load test run, but not on every run.
Steps to Reproduce
A repository with unstable reproduction steps is available: deno-server-bug-repro.
The text was updated successfully, but these errors were encountered: