Skip to content
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

Rendering error on routes that fetch data with revalidate #69971

Open
orinokai opened this issue Sep 11, 2024 · 1 comment
Open

Rendering error on routes that fetch data with revalidate #69971

orinokai opened this issue Sep 11, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template.

Comments

@orinokai
Copy link

Link to the code that reproduces this issue

https://github.com/orinokai/test-next-cache-invalidation

To Reproduce

  1. Start the application with next start
  2. Navigate to the index page
  3. Observe the following error in the console: TypeError: Response.clone: Body has already been consumed.
  4. (May or may not be related, but the following behaviour also started in the same canary version: continually reload the page and observe that, after the 5s TTL, there is a 4-5s delay before a subsequent request will trigger a re-render)

Current vs. Expected behavior

Following the steps above, I would expect the page to render without errors and for the page to be re-rendered ~5s after the last render when continuously reloading in a browser

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.22
  pnpm: 8.15.5
Relevant Packages:
  next: 15.0.0-canary.149 // Latest available version is detected (15.0.0-canary.149).
  eslint-config-next: 15.0.0-canary.149
  react: 19.0.0-rc-7771d3a7-20240827
  react-dom: 19.0.0-rc-7771d3a7-20240827
  typescript: 5.5.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 start (local)

Additional context

I tested my repro against different canary versions and the first one that introduced the bug was next@15.0.0-canary.135

@orinokai orinokai added the bug Issue was opened via the bug report template. label Sep 11, 2024
@serhalp
Copy link

serhalp commented Sep 17, 2024

@wyattjoh I've confirmed #70082 fixes this issue. The latest release also fixes the other issue @orinokai mentioned in step 4 above (technically I can't be sure if that's due to the same PR or not).

Confirmed by running the same repro steps as above but with this first:

npm i next@canary react@19.0.0-rc-206df66e-20240912 react-dom@19.0.0-rc-206df66e-20240912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants