"Invariant failed" error and a blank page
I have a simple app with two ssr pages and whenever I'm making a production deployment, for around a minute part of the requests to the server are not returning the website but rather this error in browser console and an empty page:
No logs on the server itself. After a that minute or so, all requests work normally.
The prod deployment is done on Railway, however, I remember seeing this error appear a few times on my local machine when using the dev mode. Since they were quite rare locally I ignored them but now they always appear whenever I push a new production deployment which is a bit annoying.
I've looked into the start & router code but I can't find anything that can even throw just "Invariant failed" without anything more.
I'm running start version
I'd love to debug this issue further but I'm out of ideas at this point.
Update: I've actually tried entering the website shitload of time over the last 30 minutes and there were periods where both prod deployment and local deployment (compiled + served via
No logs on the server itself. After a that minute or so, all requests work normally.
The prod deployment is done on Railway, however, I remember seeing this error appear a few times on my local machine when using the dev mode. Since they were quite rare locally I ignored them but now they always appear whenever I push a new production deployment which is a bit annoying.
I've looked into the start & router code but I can't find anything that can even throw just "Invariant failed" without anything more.
I'm running start version
1.139.8 and router version 1.133.28.I'd love to debug this issue further but I'm out of ideas at this point.
Update: I've actually tried entering the website shitload of time over the last 30 minutes and there were periods where both prod deployment and local deployment (compiled + served via
node .output/server/index.mjs) returned this error for multiple consecutive attempts 