cloudflare error

Hello - I have a sveltekit application which is hosted on cloudflare pages.

I am using google social login, and it works fine in development.

but in prod, it gives me 500 error right after I click on google account

cookies are not set, and I get this in my cloudflare log:

"message": [
"# SERVER_ERROR: ",
"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: Writable)"
]


What might be happening? How can I get this working?
Was this page helpful?