Link to the code that reproduces this issue
https://github.com/chrisbrantley/next-back-bug-repro
To Reproduce
bash
bun install
bun dev
Open http://localhost:3000/.
Click the "Click me to test interactivity" button. It increments. Baseline confirmed.
Click the link "Go to /trigger?fail=1". app/trigger/page.tsx calls notFound(), app/not-found.tsx renders with HTTP 404.
Press the browser Back button.
Click the interactivity button again. (nothing happens)
Current vs. Expected behavior
Expected behavior
The home page restores cleanly. The button still increments.
Actual behavior
On next@16.2.4: The home page DOM restores from disk cache and looks correct, but the React tree is detached. Clicking the button does nothing, no event handlers fire, no console error. React DevTools shows components with mangled minified internal names (e.g. ew, c8, eS) that don't highlight any DOM element on hover. The page is silently broken until a hard reload.
On next@16.3.0-canary.10: Same flow throws Uncaught Error: Connection closed (twice — StrictMode pair) and Next then auto-reloads the document. Final state is interactive. Canary recovers gracefully where stable silently breaks. Underlying state mismatch appears identical.
Provide environment information
- next: 16.2.4 (also reproduces on 16.3.0-canary.10, different symptom)
- react / react-dom: 19.2.4
- Browser: Chrome (latest stable)
- OS: macOS
- Turbopack (default in Next 16)
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
verified that the issue exists in the latest Next.js canary release as well as the stable version. However, the behavior is slightly different. In the current stable release silently detaches, canary throws an error and reloads the page.
Link to the code that reproduces this issue
https://github.com/chrisbrantley/next-back-bug-repro
To Reproduce
bash
bun install
bun dev
Open http://localhost:3000/.
Click the "Click me to test interactivity" button. It increments. Baseline confirmed.
Click the link "Go to /trigger?fail=1". app/trigger/page.tsx calls notFound(), app/not-found.tsx renders with HTTP 404.
Press the browser Back button.
Click the interactivity button again. (nothing happens)
Current vs. Expected behavior
Expected behavior
The home page restores cleanly. The button still increments.
Actual behavior
On next@16.2.4: The home page DOM restores from disk cache and looks correct, but the React tree is detached. Clicking the button does nothing, no event handlers fire, no console error. React DevTools shows components with mangled minified internal names (e.g. ew, c8, eS) that don't highlight any DOM element on hover. The page is silently broken until a hard reload.
On next@16.3.0-canary.10: Same flow throws Uncaught Error: Connection closed (twice — StrictMode pair) and Next then auto-reloads the document. Final state is interactive. Canary recovers gracefully where stable silently breaks. Underlying state mismatch appears identical.
Provide environment information
- next: 16.2.4 (also reproduces on 16.3.0-canary.10, different symptom) - react / react-dom: 19.2.4 - Browser: Chrome (latest stable) - OS: macOS - Turbopack (default in Next 16)Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
verified that the issue exists in the latest Next.js canary release as well as the stable version. However, the behavior is slightly different. In the current stable release silently detaches, canary throws an error and reloads the page.