In layout.tsx
that lives next to loader.tsx
, headers
are empty when navigated via Link
#56068
Open
1 task done
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://github.com/danieltott/next-broken-linked-headers
To Reproduce
This does not happen when running
pnpm dev
orpnpm build && pnpm start
locally on my mac (node v18.8.0), only on vercelloading.tsx
failing to read any headers upon client-side navigationCurrent vs. Expected behavior
Current:
When navigating to a server component,
headers
is empty except for"next-url: /its-broken"
(or whatever the url is).Expected:
I can read headers/cookies in layout server components at any time.
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
I am 99% sure this is related to the changes in #55950
This problem does not happen in
13.5.3-canary.3
, but starts in13.5.3-canary.4
and later. You can see it working properly here: https://next-broken-linked-headers-git-version-1353-canary3-danieltott.vercel.app/ with13.5.3-canary.3
installed.headers
is only empty inlayout.tsx
(notpage.tsx
) and only whenlayout.tsx
is next to aloader.tsx
.The text was updated successfully, but these errors were encountered: