Keep the page when the Sankey search chunk fails to load - #286
posthog[bot] wants to merge 2 commits into
Conversation
The Sankey chart loads react-select with next/dynamic. When that chunk fails, the rejected import reaches the root error boundary, and global-error.tsx replaces the whole page. Retry the import once. If the retry also fails, render no search box and keep the chart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 77717744-4e69-4071-8073-86413ff6bd60
🚨 Preview Deployment Blocked - Security ProtectionYour pull request was blocked from triggering preview deployments Why was this blocked?
How to resolve this:Option 1: Get Collaborator Access (Recommended) Option 2: Request Permission Override For Repository Administrators:To disable this security check ( This security measure protects against malicious code execution in preview deployments. Only trusted collaborators should have the ability to trigger deployments. 🛡️ Learn more about this security featureThis protection prevents unauthorized users from:
Preview deployments are powerful but require trust. Only users with repository write access can trigger them. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 77717744-4e69-4071-8073-86413ff6bd60
Problem
react-select) as a separate chunk.next/dynamicimport throws during render. The app has noerror.tsx, so the error goes toglobal-error.tsx, which replaces the page with the generic Next.js error screen. That handler is also theposthog.captureExceptioncall that records theChunkLoadError.9874.40d4186ce5fa533b.js, which isreact-select. It comes from a small set of/en/first-nations/ISC_*/2024pages.Note
The rise probably comes from automated traffic, not from a broken deploy.
immutable, Cloudflare cache HIT.timeoutonly after 120 s. These exceptions arrive 0 to 4 s after the page view, so the client fast-forwards its timers. Headless browsers do this.Origin
signals-scout-generalChanges
react-selectloader now retries the import once. If the retry also fails, it resolves to an empty component. The chart stays on the page, and only the search box is absent.Risk
ChunkLoadErrorevents: other chunks, other pages, and thebuildcanada.comsite. Those stay at the earlier background level.Verification
I ran
next dev(webpack) with Playwright on/en/federal/spending. In the blocked runs, Playwright stopped all requests for thereact-selectchunk.main, chunk blockedpnpm test(64 tests) andpnpm lintpass.Agent context
react-selectimport: the existing comment says that the dynamic import prevents SSR hydration mismatches.import()requests the script again.Created with PostHog Desktop from this inbox report.
🤖 Generated with Claude Code