-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
The server crashes when getServerSideProps finishes executing #15118
Comments
Can you provide an example of how you are using Link in your project please? |
Here is the example next.js-bug-redirect/pages/about.js |
This issue still exists with |
Adds a minimal reproduction for vercel#15118 as a test. The behavior is different in the latest version, it no longer crashes the server. The request hangs instead.
Had a look at this and it's no longer crashing the server, however it does hang the particular request and does not resolve so this should still be investigated. I've added a minimal reproduction in #33129. |
@timneutkens sorry, I've removed all repositories related to the next.js bugs. Your reproduction code seems correct except commented P.S. Despite all, if anyone else comes across this problem then it is highly recommended to use a more idiomatic |
This fixes the case where calling `res.end()` is `getServerSideProps` would cause the request to hang in development due to our `Proxy` around `res` causing internal `ServerResponse` fields to not be available ([related post](https://javascript.info/proxy#built-in-objects-internal-slots)). I also migrated our `getServerSideProps` test suite to an e2e suite with a test for this case. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: #15118 Fixes: #32824 Closes: #33129
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. |
This fixes the case where calling `res.end()` is `getServerSideProps` would cause the request to hang in development due to our `Proxy` around `res` causing internal `ServerResponse` fields to not be available ([related post](https://javascript.info/proxy#built-in-objects-internal-slots)). I also migrated our `getServerSideProps` test suite to an e2e suite with a test for this case. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: vercel#15118 Fixes: vercel#32824 Closes: vercel#33129
This fixes the case where calling `res.end()` is `getServerSideProps` would cause the request to hang in development due to our `Proxy` around `res` causing internal `ServerResponse` fields to not be available ([related post](https://javascript.info/proxy#built-in-objects-internal-slots)). I also migrated our `getServerSideProps` test suite to an e2e suite with a test for this case. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md` Fixes: vercel#15118 Fixes: vercel#32824 Closes: vercel#33129
Bug report
Describe the bug
I'm trying to use
next/link
to refer to a route that usesgetServerSideProps
for redirection, and the server crashes whengetServerSideProps
finishes executing.To Reproduce
Repository: next.js-bug-redirect
Steps to reproduce the behavior:
Home
linkExpected behavior
Redirecting back to
/about
.Screenshots
System information
Additional context
Tried to run it with
next@canary
, but it also crashes.The text was updated successfully, but these errors were encountered: