Next.js: "Unexpected fiber popped" / "An unexpected error has occurred"

Created on 28 Sep 2019  路  10Comments  路  Source: vercel/next.js

Bug report

Describe the bug

At least two of the NextJS examples do not work when run "out of the box".

To Reproduce

  1. Follow the steps in either of these two READMEs:
  2. Run npm install && npm run dev.

    • React will report "Unexpected fiber popped" and "Unexpected pop" in the console.

    • In the Material UI example, buttons will not demonstrate the ripple effect when clicked. In my application, the effects are more severe, leading to loss of interactivity.

  3. Deploy using npx now. Resulting application will report errors.

Expected behavior

Given examples work when deployed and run.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS

    • Development: Ubuntu 18.04 LTS

    • Deployment: Zeit Now platform

  • Browser: Reproducible in Chrome and Firefox
  • Version of Next.js: 9.0.6 (current latest)
upstream

Most helpful comment

This is now fixed in v16.10.1.

However, it's more like a workaround to fail gracefully because the behavior is not supported. It only accidentally worked in 16.9. We will warn in a future minor.

So we need to figure out how to address this in Next.

More context here: https://github.com/facebook/react/issues/16938#issuecomment-536207871

All 10 comments

I got this error as well. Did some debugging, and found out it's happening on latest NextJS and React 16.10.0. If you're using 16.9.0 it works fine.

Same issue here, and same resolution as @martindavid

Same issue here. Just going through the getting started tutorial and the index page isn't clearing, rendering itself twice, and throwing errors in console.

Switching to 16.9.0 worked as well.

Screen Shot 2019-09-27 at 9 16 11 PM

Hi everyone! Like the error message suggests, this may be a bug with React 16.10.
I've opened an issue in the React project to track this: https://github.com/facebook/react/issues/16938.

Please downgrade to [email protected] and [email protected] for the time being.

Thanks!

Keeping this open until the PR is on stable.

Just released a new canary (will be on npm soon) https://github.com/zeit/next.js/releases/tag/v9.0.7-canary.9

Released on stable too: https://github.com/zeit/next.js/releases/tag/v9.0.7.

Note that in general we do not ship stable versions on weekends but this issue affects basically everyone getting started with Next.js / React and everyone upgrading.

I'm going to close this issue as the patch has been merged on both canary/stable and this is an upstream issue raised by @timer here: https://github.com/facebook/react/issues/16938

This is now fixed in v16.10.1.

However, it's more like a workaround to fail gracefully because the behavior is not supported. It only accidentally worked in 16.9. We will warn in a future minor.

So we need to figure out how to address this in Next.

More context here: https://github.com/facebook/react/issues/16938#issuecomment-536207871

Thanks so much for your help identifying and fixing this! Sorry I didn't recognize that it was an upstream error; I made some incorrect assumptions based on the error message.

Was this page helpful?
0 / 5 - 0 ratings