-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Error: NEXT_REDIRECT error when redirecting on server after navigating via <Link>. #71555
Comments
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
I can reproduce this: https://github.com/lubieowoce/next-redirect-error-71555 |
Looks like this started appearing in (Notably, up until |
Pushed local changes to my initial reproduction at https://github.com/mtansk/nextrederr |
Facing same issues here: elie222/inbox-zero#249 Started happening after upgrading to Nextjs 15 |
@lubieowoce do you consider 404 and unknown scheme errors as part of this same issue? UPDATE: 404 and scheme errors appear when using "--turbo". |
@mtansk I'm Pretty sure that those source map errors (404 & "Unknown url scheme") are unrelated. Although some of the source map 404s might be due to unexpected next internals appearing in the stack trace or something, so they'd go away when we fix this (also i can't reproduce the ones that you're seeing in the terminal) |
) Our patched `console.error` tries to skip internal router errors by checking `isNextRouterError(error)`. however, if one of those happened on the server and got replayed on the client, it gets logged differently -- it's prefixed with the `[ Server ]` badge. this changes the position where the actual error object is in `args` and thus messes up our detection, so we end up printing it out (instead of hiding it like we should) This PR adds a check that attempts to match replayed server errors (following [similar logic from react devtools](https://github.com/facebook/react/blob/65a56d0e99261481c721334a3ec4561d173594cd/packages/react-devtools-shared/src/backend/flight/renderer.js#L88-L93)) and thus also filter out router errors that originated on the server Closes vercel#71555
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Link to the code that reproduces this issue
https://github.com/mtansk/nextrederr
To Reproduce
Current vs. Expected behavior
Expeted: redirect without an error.
Current: console error.
The error appears only when using "Link" component, "a" element works as expected.
Provide environment information
Which area(s) are affected? (Select all that apply)
create-next-app, Developer Experience, Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Error appears after RC 2. RC 1 was ok. Didn't check other canaries
The text was updated successfully, but these errors were encountered: