Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 9.5.0 error in _error page #263

Closed
skoob13 opened this issue Jul 29, 2020 · 4 comments
Closed

Next 9.5.0 error in _error page #263

skoob13 opened this issue Jul 29, 2020 · 4 comments
Labels

Comments

@skoob13
Copy link

skoob13 commented Jul 29, 2020

Describe the bug

Next team has changed the codebase in 9.5.0. They added a check for pageProps in client code.

When _error page is opened, next _error page will throw:

TypeError: Cannot read property 'statusCode' of undefined

on this line.

To Reproduce

https://codesandbox.io/s/blissful-wave-lpxv9

I also created a repo: https://github.com/skoob13/next-redux-wrapper/commit/2b106126659195b79725d2d7f321ae4794d8a3c3.

Steps to reproduce:

  1. Open codesandbox
  2. Press "Navigate to error"
  3. Observe an error

Expected behavior

Error page should open.

@skoob13 skoob13 added the bug label Jul 29, 2020
@kirill-konshin
Copy link
Owner

This seems to be a bug in Next.js, as this check is not legitimate, since pageProps may not exist in the hydrateProps if the application was wrapped with old-style _app.

@kirill-konshin
Copy link
Owner

vercel/next.js#15647 leaving this here for reference.

@kirill-konshin
Copy link
Owner

Upstream has been fixed

@skoob13
Copy link
Author

skoob13 commented Jul 30, 2020

@kirill-konshin I'm sorry for a wrong report. Thank you for the clarification and the awesome package!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants