Skip to content

Async root layout breaks app when wrapped inside a Suspense boundary #76778

@mattiaz9

Description

@mattiaz9

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/awesome-fermi-g8x5x2

To Reproduce

  1. Enable dynamicIO
  2. Move the async root layout into a Suspense
  3. Throw an error inside any page component (or use any of notFound, unauthorized, forbidden function)

Current vs. Expected behavior

current: the root layout is not properly loaded, with the following error displayed: 'The following tags are missing in the Root Layout: , .'

expected: it should load the root layout as if it wasn't wrapped inside a Suspense

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020
  Available memory (MB): 16384
  Available CPU cores: 12
Binaries:
  Node: 22.13.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.5.2
Relevant Packages:
  next: 15.2.2-canary.0 // Latest available version is detected (15.2.2-canary.0).
  eslint-config-next: 15.1.7
  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

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

next dev (local)

Additional context

Normally I wouldn't put the root layout inside a Suspense, but it was the only way to silent the error 'A component accessed data, headers, params, searchParams, or a short-lived cache without a Suspense boundary nor a "use cache" above it', caused by having dynamicIO = true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamicIORelated to dynamicIO.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions