Next.js: A fully rendered next page is re-rendered to a 404 page after successfull initial render

Created on 24 Jan 2017  路  5Comments  路  Source: vercel/next.js

I've been trying to track this down for a day now and I've managed to come up with a small example code and I know the version bump that caused this issue.

This happens in older versions of Safari and Mobile Safari. The newest version of Safari I've found to have this issue is version 8.0.8 that is the only bundled browser for Yosemite. It's not even that old comparing how long Mac's last. I haven't seen this bug in other browsers (Chrome, FF etc.) while testing.

In beta.12 the app renders correctly and no issues arise. With beta.13 the app is first rendered correctly and then very quickly re-rendered to a "404 This page could not be found.". I've tracked that the issue is related to next trying to load a URL http://localhost:3000/_next/pages/fi on Safari that leads to a 404 error that causes the app to render the 404 page. Why this is happening is some kind of internal issue with next, custom server and older Safaris (my best guess).

Here's what I can provide to help solve this issue:

bug

Most helpful comment

Guys, found the issue and here's the fix: https://github.com/zeit/next.js/pull/870

All 5 comments

I know that getting hold of a Safari 8 on Yosemite is a bit tricky but there are free tiers available for browserstack.com that will allow testing this easily.

Also happening on Safari 9.0.3 and beta.18.

Hmm. It's a bug. Getting that browser is the hardest part.
Let see.

Guys, found the issue and here's the fix: https://github.com/zeit/next.js/pull/870

Excellent work @arunoda. Hopefully this will make it to the next beta. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jesselee34 picture jesselee34  路  3Comments

timneutkens picture timneutkens  路  3Comments

irrigator picture irrigator  路  3Comments

formula349 picture formula349  路  3Comments

DvirSh picture DvirSh  路  3Comments