Skip to content

[DynamicIO]PPR pages are rendered every time #76072

@AkifumiSato

Description

@AkifumiSato

Link to the code that reproduces this issue

https://github.com/AkifumiSato/nextjs-dynamicio-and-ppr-issue-demo

To Reproduce

next build and next start in the reproduction repository.

// app/page.tsx
export default async function Page() {
  console.log("render: Page")

  return (
    <div>
      ...
      <Suspense fallback={<>loading...</>}>
        <Products />
      </Suspense>
    </div>
  );
}

async function Products() {
  console.log("render: Products Components")

  // ...
}

Build log

Route (app)                              Size     First Load JS
┌ ◐ /                                    3.51 kB         118 kB
...

◐  (Partial Prerender)  prerendered as static HTML with dynamic server-streamed content

Request log /(every time)

render: Page
render: Products Components

Current vs. Expected behavior

When a request comes in for a PPR page, we expect only the Dynamic Hole to be rendered. In reality, however, the entire page is rendered. This means that PPR will not work as intended when Next.js is employed for self-hosting.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:43 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 8
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: N/A
  pnpm: 9.6.0
Relevant Packages:
  next: 15.2.0-canary.60 // There is a newer canary version (15.2.0-canary.61) available, please upgrade! 
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A
 ⚠ There is a newer canary version (15.2.0-canary.61) available, please upgrade! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

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

dynamicIO, Partial Prerendering (PPR)

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

next start (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Cache ComponentsRelated to the `cacheComponents`, `useCache`, or `ppr` experimental flags.linear: nextConfirmed issue that is tracked by the Next.js team.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions