Preload issue for layout with client tabs (consuming usePathname
) and server component children
#58419
Open
1 task done
Labels
bug
Issue was opened via the bug report template.
Linking and Navigating
Related to Next.js linking (e.g., <Link>) and navigation.
stale
The issue has not seen recent activity.
Link to the code that reproduces this issue
https://github.com/kevinschaich/ssr-render-bug
To Reproduce
Current vs. Expected behavior
Clicking the tab with Next's
Link
component should redirect to a new server component within the same layoutKapture.2023-11-14.at.01.57.38.mp4
In the client console, sometimes I get the following warning:
When deployed to Vercel in production, I get the following error:
^ I think it's trying to stream the contents of one of the server component children in the layout.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000 Binaries: Node: 20.3.1 npm: 9.6.7 Yarn: 1.22.19 pnpm: 8.8.0 Relevant Packages: next: 13.5.6 eslint-config-next: 13.5.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Routing (next/router, next/navigation, next/link)
Additional context
I tested this bug against the next@latest, next@canary, and next@13.5.6 and they're all the same issue for me. Note the info block above is just from the most recent test (13.5.6).
I cannot share the entire source code for my project but I shared a minimal example with the same structure. I'm able to reproduce the error in the minimal repo less often but they both share the same structure.
The text was updated successfully, but these errors were encountered: