-
Notifications
You must be signed in to change notification settings - Fork 116
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
getServerSideProps returns an empty object when using next/link and a middleware. #3704
Comments
Hi @FacundoSpira 👋 , thanks for raising this and for sharing detailed reproduction steps. I was able to reproduce the behavior where |
Thanks! Glad you were able to reproduce it. Please let me know if there's anything we can help with. |
Hello @Jay2113, hope you are doing well. |
@FacundoSpira 👋 , apologies for the delayed response here. We have identified this as a bug and are actively working to mitigate it. I'll keep you posted with any updates. |
We have deployed a fix for this issue. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d3g9j0bpx2nsb4
AWS Region
us-east-1
Amplify Hosting feature
SSR
Frontend framework
Next.js
Next.js version
13.4.2
Next.js router
Pages Router
Describe the bug
I created a simple Next.js application. Inside I have some pages that use SSR (with
getServerSideProps
) and I have an empty middleware (it just returnsNextResponse.next()
).The different pages are pretty simple, just containing a getServerSideProps and printing the content of that on the screen:
The issue is than randomly when navigating through the links, getServerSideProps return an empty object. That behaviour can be seen on the following video and it appears to happen when we start navigating "too fast":
Screen.Recording.2023-08-18.at.16.27.08.mov
This only happens when we use
next/link
, a middleware file andgetServerSideProps
at the same time.I created a minimal reproducible example on the following repository: https://github.com/FacundoSpira/amplify-nextlink-middleware-error
And the app is deployed here: https://main.d3g9j0bpx2nsb4.amplifyapp.com/
Expected behavior
The app should navigate correctly, regardless of how many times and how quickly I click on a link.
Reproduction steps
Build Settings
No response
Log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: