-
Notifications
You must be signed in to change notification settings - Fork 30k
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000
Binaries:
Node: 16.13.2
npm: 8.7.0
Yarn: 1.22.15
pnpm: 6.11.0
Relevant packages:
next: 12.2.3-canary.5
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0
warn - Failed to fetch latest canary version. (Reason: Cannot read properties of undefined (reading 'tag_name').)
Detected "12.2.3-canary.5". Visit https://github.com/vercel/next.js/releases.
Make sure to try the latest canary version (eg.: npm install next@canary) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
What browser are you using? (if relevant)
n/a
How are you deploying your application? (if relevant)
next start
Describe the Bug
If I define a custom error page following the instructions on https://nextjs.org/docs/advanced-features/custom-error-page#more-advanced-error-page-customizing, the built app will log the following error to console:
{
"name": "Internal Server Error.",
"message": "500 - Internal Server Error.",
"statusCode": 500
}
A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred
Defining an client-side ErrorBoundary has no effect, in fact it seems to be mounting later than this error message being logged.
Expected Behavior
I should see no error after following the documentation.
Link to reproduction
https://codesandbox.io/s/epic-flower-kydj8s?file=/pages/_error.tsx
To Reproduce
- build next app and start it (or open codesandbox link above)
- visit localhost:3000
- see error message in console
- see ErrorBoundary rendering after the error is logged and saying there are no errors
