AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Navigation Crashes With React #412 On Partial RSC Payloads

Next.js App Router navigation fails with React error #412 when receiving partial RSC payloads during PPR, causing client-side crash instead of falling back to full page load.

highConfidence 85%Next.jsAffected V16.3.0Affected V16.3.1-Canary.15

Origin Analysis

The navigation response consumer in Next.js does not catch errors thrown during React Flight rendering (e.g., #412 'Connection closed') that occur outside the try/catch in fetchServerResponse. This prevents the existing fallback to browser navigation, leading to an unhandled error screen.
1. Run production build with PPR enabled (next build && next start). 2. Serve a partial RSC payload for a navigation route (e.g., via cache proxy). 3. Click a link to navigate to that route. 4. Observe error screen and console error 'Minified React error #412'. Direct page load works.

Fixing Code Block

Edge Case Audit

This fix relies on a global error boundary and may affect other global error handling. In concurrent navigations or rapid error occurrences, multiple hard navigations could be triggered; consider adding a debounce or a flag to prevent duplicate fallbacks. Rollback is straightforward: remove the error boundary file. Test thoroughly in non-PPR and non-navigation error scenarios to avoid unintended fallbacks.

Ecosystem Topology