-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Response.clone: Body has already been consumed. #73035
Comments
I am having the same issue, "next": "^14.2.18". |
This comment has been minimized.
This comment has been minimized.
FYI for others: There's been a possibly related discussion in #69635 even after it was "answered" ... lots of people encountering related/similar issues, seems like downgrading to Node 18 is a workaround. |
☝️ The above worked for me on |
I found that there is a draft PR which will possibly resolve this issue: #73274 |
Should be addressed in #73274 |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/grzegorzpokorski/next-type-error-response-clone
To Reproduce
It is challenging to create minimal reproducible code because this error appears randomly within my application. I have attempted to recreate the structure of the application code where I encounter the error. However, in the provided code that aims to reproduce the problem, I cannot replicate the issue – the error simply does not occur. Unfortunately, I cannot share the original application where the error happens.
What is important is that the error only occurs on SSG pages, such as
/post/[id]
. My project uses the latest stable version of Next.js (v15.0.3). The application exhibits this behavior both when built locally on my computer and when deployed on Vercel.When the error appears when I navigate to page like this:
/post/[id]
, refresh page in browser in most cases fix error.Current vs. Expected behavior
Currently I randomly receive a
TypeError: Response.clone: Body has already been consumed.
error in console. I expect app to work without breaking.Provide environment information
Node.js v22.11.0 Operating System: Platform: linux Arch: x64 Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024 Available memory (MB): 7843 Available CPU cores: 8 Binaries: Node: 22.11.0 npm: 10.9.0 Yarn: N/A pnpm: 9.4.0 Relevant Packages: next: 15.0.3 // Latest available version is detected (15.0.3). eslint-config-next: 15.0.3 react: 19.0.0-rc-02c0e824-20241028 react-dom: 19.0.0-rc-02c0e824-20241028 typescript: 5.6.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next build (local), Vercel (Deployed)
Additional context
In console I receive error like this:
I spend some time to find what code causes that error in my case and I found that
/home/username/project/.next/server/chunks/1241.js:2:6811
points to this code:next.js/packages/next/src/server/lib/dedupe-fetch.ts
Line 92 in 697aff9
The text was updated successfully, but these errors were encountered: