fix: add ErrorBoundary to Search modal and fix MobileMenu error recovery#17755
Merged
Conversation
The SearchModal is dynamically imported and can fail with ChunkLoadError when the webpack runtime references stale chunk hashes after a deploy (Next.js 14 App Router bug: vercel/next.js#78756). Without an error boundary, this crashes the entire React tree and shows a black screen. - Wrap SearchModal with ErrorBoundary showing a recovery dialog - Fix MobileMenu error fallback to use page reload instead of reset, since reset just re-triggers the same failed import
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
wackerow
approved these changes
Mar 12, 2026
Member
|
Looks like we may be duplicating much of the error fallback between |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
SearchModalwith anErrorBoundaryso that aChunkLoadErrorshows a recovery dialog ("Refresh page" / "Close") instead of crashing the entire app to a black screenMobileMenuerror fallback to usewindow.location.reload()instead ofreset, sinceresetjust re-triggers the same failed dynamic importContext
The webpack runtime in Next.js 14 App Router uses
[chunkhash]instead of[contenthash](vercel/next.js#78756), so its filename can stay the same across deploys even when chunk mappings change. Browsers that cached the old runtime serve stale chunk hashes, causing 404s on lazy imports likeSearchModal. This is fixed upstream in Next.js 15.3.4+ (vercel/next.js#80153).Test plan