Reproduction:
snapshot = AsyncLocalStorage.snapshot();)fetch() in the snapshot context.The following error is logged:
[wrangler:inf] GET / 302 Found (6ms)
using snapshot
[wrangler:err] Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance. (I/O type: SpanParent)
at Object.apply ([...]/strip-cf-connecting-ip-header.js:9:18)
at null.<anonymous> ([...]/src/index.ts:31:39)
at Object.fetch ([...]/src/index.ts:31:12)
at fetchDispatcher ([...]/middleware-loader.entry.ts:54:17)