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

[9.5.6-canary.17][notFound][Vercel] incorrect props in custom 404-page when using blocking fallback #18293

Closed
rokinsky opened this issue Oct 27, 2020 · 3 comments · Fixed by #18300
Milestone

Comments

@rokinsky
Copy link
Contributor

Bug report

Describe the bug

I use the notFound feature on SSG pages with enabled blocking fallback. The custom 404-page gets incorrect props from getStaticProps when notFound occurs. This happens only when an app is deployed to Vercel.

To Reproduce

Repository: next.js-bug-not-found-props
Steps to reproduce the behavior:

  1. Deploy the app to Vercel
  2. Go to the website, e.g. https://next-js-bug-not-found-props.vercel.app
  3. See
{
  "url": {
    "query": {},
    "pathname": "/404",
    "asPath": "/[[...slug]]"
  }
}

first and see

{
  "url": {
    "query": {},
    "pathname": "/404",
    "asPath": "/"
  }
}

after hydration

Expected behavior

Displaying

{
  "is404": true
}

Screenshots

N/A

System information

  • OS:macOS
  • Browser (if applies): chrome
  • Version of Next.js: 9.5.6-canary.17
  • Version of Node.js: v10.22.1

Additional context

Works great locally in dev and prod modes.

@ijjk
Copy link
Member

ijjk commented Oct 27, 2020

Good catch, thanks for testing these features out and reporting!

@rokinsky
Copy link
Contributor Author

Thanks for all the fixes, @ijjk! 😊

@kodiakhq kodiakhq bot closed this as completed in #18300 Oct 27, 2020
@Timer Timer added this to the iteration 11 milestone Oct 27, 2020
kodiakhq bot pushed a commit that referenced this issue Oct 27, 2020
This ensures that when using a `pages/404` file with `getStaticProps` that we call `getStaticProps` in `fallback: 'blocking'` mode

Fixes: #18293
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants