KEMBAR78
React 17.0.0-rc.0 breaks error reporting · Issue #16108 · vercel/next.js · GitHub
Skip to content

React 17.0.0-rc.0 breaks error reporting #16108

@Winwardo

Description

@Winwardo

Bug report

Describe the bug

When upgrading from 16.13.1 to 17.0.0-rc.0, the runtime error overlay does not display at all.

To Reproduce

In a component, throw an error. This can be either on the server, or purely in the browser. The type of error does not seem to matter - merely that it would be one that triggers the dev error box.

I've tried to make this repo as minimal as possible - using create-next-app and removing unnecessary parts.

https://github.com/Winwardo/nextjs-react-17-error-failure/blob/master/pages/index.js
https://github.com/Winwardo/nextjs-react-17-error-failure/blob/master/package.json

Expected behavior

Screenshot using React 16.13.1
image

Screenshots

Screenshot using React 17.0.0-rc.0, with console scrolled to where I believe the issue is in NextJS. (Note how the page is completely blank - anything that was previously rendered will be removed.)
image

System information

  • Browser: Tested on both Chrome (with an assortment of installed extensions like React devtools, which spits out errors too) and Firefox (with no extensions installed that I'm aware of)
  • Version of Next.js: 9.5.2 (I've experienced this on 9.5.1 as well)
  • Version of Node.js: 12.16.3

Additional context

This happens with recent experimental versions of React as well, but it didn't seem worth making an issue for them as they're not meant to be supported.

This happens even if I have my own error boundary catching the error (I use https://github.com/bvaughn/react-error-boundary) though I believe that's part of Next's philosophy to capture any and all errors, even handled ones.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions