Open caleblloyd opened 3 weeks ago
On further investigation, the layout never reloads in next start
no matter which page is loaded initially.
As a workaround, I am able to remove the <Suspense>
in the Layout, and use layout.tsx
instead:
I still feel like this is a bug though, because the Loading UI and Streaming documentation seems to indicate that custom Suspense boundaries should work
Hi, I've been experiencing the same bug and it's blocked our upgrade from 14 -> 15.
EDIT: This does still repro with 15.0.4-canary.8
, it just seems a bit less common, but that could just be randomness. I haven't been able to isolate a small repro repo like this issue, but navigating quickly through different pages on my project sometimes causes it to get stuck at Suspense boundaries inside the page, not in a Loading.tsx
Original, invalid
I've just tested again with
15.0.4-canary.8
and it appears to be fixed (I can once again navigate through my app back and forth without getting stuck at Suspense boundaries) I've looked through both NextJS' and React's changelogs and obviously cannot see which commit may have fixed this - are you still seeing this on your repro?
Link to the code that reproduces this issue
https://github.com/caleblloyd/next-layout-cache-bug/
To Reproduce
To Reproduce
Navigate to http://localhost:3000/now
Video of bug starting from Now Page
If you start at the Home Page things work fine
Navigate to http://localhost:3000
Video of things working starting from Home Page
Current vs. Expected behavior
I am using a layout in a subdirectory of the app router. It should be dynamic because I am using
export const dynamic = 'force-dynamic'
on the layout.If I load a page that uses this layout initially, then navigate away and navigate back, it gets stuck at the
Suspense
andLoadData
is never called again.next dev
has the static route indicator on the page upon navigating back.If I load a page that does not use this layout initially, I can navigate to a page using the layout multiple times and it works.
next dev
does not have the static route indicator on the page.Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
No response