From Discord: Issue with Effect Reading Request Body in Next.js Application
Summary
A user is experiencing an issue with their Next.js application, specifically related to the Effect Typescript library reading the request body during server-side rendering (SSR). They provided an error message indicating a TypeError related to a detached ArrayBuffer when attempting to perform a POST request. The user mentioned this occurs when using the useSuspenseQuery hook to call an RPC endpoint. They also shared a GitHub repository with a standalone reproduction of the problem for further investigation.
Key takeaways:
- The issue is linked with request handling during SSR in a Next.js application using Effect.
- The error message suggests a problem with handling the response body, specifically regarding a detached
ArrayBuffer. - The problem surfaces when making POST requests in the context of
useSuspenseQuery. - A GitHub repository is available to reproduce and investigate the issue further.
Discord thread
https://discord.com/channels/795981131316985866/1354016822843801630
repro here: https://github.com/titouancreach/repo-bug-rpc
it works with the new version of RPC