open-next
open-next copied to clipboard
Hitting a non-existent route results in infinite redirect. Same app behaves correctly locally and on vercel.
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.
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.
Thanks!
Next.js v14.2.1 OpenNext v2.3.7
Sorry, not sure what is "min repo", could you please elaborate?
A minimum reproduction project on github so we can see what's causing the issue.
@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.
I'm going to close this old issue. If that's still an issue, reopen and provide a reproduction