Error: Cannot perform I/O on behalf of a different request

Hi Everyone

I have a project where i'm using sveltekit but i had a problem where when clicking back or forward in the browser is causing internal error 500? after i get the internal error 500 i try to refresh (ctrl + r) it went normal.

I have 2 webapps that have this issues, and weirdly its happening in the production build that i already deploy in the cloudflare pages, dev and local build environment is fine.

i see the logs and i got

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.
Was this page helpful?