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

Prefetched PPR page segments stay suspended when navigated to after a rebuild #75047

Open
bradleydsmith opened this issue Jan 17, 2025 · 0 comments · May be fixed by #75013
Open

Prefetched PPR page segments stay suspended when navigated to after a rebuild #75047

bradleydsmith opened this issue Jan 17, 2025 · 0 comments · May be fixed by #75013
Labels
dynamicIO Related to dynamicIO. Partial Prerendering (PPR) Related to Partial Prerendering.

Comments

@bradleydsmith
Copy link

Link to the code that reproduces this issue

https://github.com/bradleydsmith/reproduction-next-prefetch-rebuild-ppr-suspended

To Reproduce

  1. Build the application with npm run build
  2. Start the server with npm run start
  3. Navigate to http://localhost:3000 and do not click anything or close the page
  4. Stop the server
  5. Run npm run build
  6. Start the server again with npm run start
  7. Click the Prefetched link on the page

Current vs. Expected behavior

When following the steps the suspended segment stays suspended and does not get resolved and rendered. I expected the page to do an MPA navigation and reload due to detecting a change in the response build ID

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64
  Available memory (MB): 8192
  Available CPU cores: 8
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: N/A
  pnpm: 9.6.0
Relevant Packages:
  next: 15.2.0-canary.14 // Latest available version is detected (15.2.0-canary.14).
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

dynamicIO, Partial Prerendering (PPR)

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed), next start (local), next build (local)

Additional context

The issue is being caused by an incorrect check in listenForDynamicRequest. The issue occurs after a rebuild of the server, this could be a local rebuild and restart of the server but also affects a deployment to Vercel without skew protection. Also note how the issue does not happen on the Not Prefetched link, it only affects prefetched pages

@github-actions github-actions bot added dynamicIO Related to dynamicIO. Partial Prerendering (PPR) Related to Partial Prerendering. labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamicIO Related to dynamicIO. Partial Prerendering (PPR) Related to Partial Prerendering.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant