Closed as not planned
Closed as not planned
Description
Link to the code that reproduces this issue
https://github.com/better-salmon/next14-ppr-double-revalidation-bug
To Reproduce
- Run backend server with
npm run backend
. - In the separate terminal build and start the app with
npm run build && npm run start
. - Open http://localhost:3000/count in the browser.
- Wait for the
Cache state
field to change tostale
. - Reload the page twice to see the revalidated page with
Cache state: fresh
. - Optionally, open the terminal with the backend and see that in logs
/count
route was triggered twice.
Current vs. Expected behavior
Expected behavior:
When ppr
option is enabled or disabled, the value should be greater than before by 1 after each revalidation.
Actual behavior:
When ppr
option is enabled, the value is greater than before by 2 after each revalidation, meaning that the fetch was triggered twice.
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:28:31 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T8112
Binaries:
Node: 20.9.0
npm: 10.1.0
Yarn: N/A
pnpm: 8.10.0
Relevant Packages:
next: 14.0.2-canary.13
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
App Router
Additional context
No response