You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user navigates back/forward in history, getInitialProps is being called on the client-side which throws an error.
Unless I am misunderstanding something, this should never be called when Automatic Static Optimization is disabled, since all pages should be server side rendered.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Disable Automatic Static Optimization
Load page with getInitialProps
Navigate away and back
See error
Expected behavior
Should not call getInitialProps client side
System information
Version of Next.js: 9.2.1
The text was updated successfully, but these errors were encountered:
getInitialProps is called in the browser for client-side navigations with Link and next/router; and in the server for the first render, so such behavior is expected.
You may want to check for getServerProps, currently experimental: #9524 - but it will be released very soon.
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
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
When a user navigates back/forward in history,
getInitialProps
is being called on the client-side which throws an error.Unless I am misunderstanding something, this should never be called when Automatic Static Optimization is disabled, since all pages should be server side rendered.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
getInitialProps
Expected behavior
Should not call
getInitialProps
client sideSystem information
The text was updated successfully, but these errors were encountered: