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

Hitting a non-existent route results in infinite redirect. Same app behaves correctly locally and on vercel. #405

Open
ilyastam opened this issue Apr 20, 2024 · 4 comments

Comments

@ilyastam
Copy link

I have a nextjs app on v14, it uses page routing.
when I enter a non-existent route (/foobar) - the app 308 redirects to /404/ few dozen times, and then browser cancels the request.

Same app works fine when ran locally with npm run dev or on vercel.

Here is the link to a version deployed with sst: https://d2ia2gbaq4gtdc.cloudfront.net/
Working version on vercel: tripyacht.com

This is the only thing thats stopping me from fully embracing open next, and migrating away from Vercel.

@khuezy
Copy link
Collaborator

khuezy commented Apr 21, 2024

Hi can you specify the open-next version and exact next version?
Can you also set up a min repo?

According to the latest versions
pages: https://dqijpnhzoveol.cloudfront.net/foo
app: https://d1rjbhcyvwj9a2.cloudfront.net/foo

They both redirect to 404 and does not have an infinite redirect.

@ilyastam
Copy link
Author

Thanks!

Next.js v14.2.1
OpenNext v2.3.7

Sorry, not sure what is "min repo", could you please elaborate?

@khuezy
Copy link
Collaborator

khuezy commented Apr 22, 2024

A minimum reproduction project on github so we can see what's causing the issue.

@khuezy
Copy link
Collaborator

khuezy commented Apr 22, 2024

@ilyastam can you try upgrading next to 14.2.2, according to the test, it passes: https://discord.com/channels/983865673656705025/1027265626085019769/1230685589926576309

But there might be some edge case in your setup that's causing the infinite loop that we haven't covered. We'll need a reproduction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants