a year ago
Hello
I have moved my Next.js project from Vercel to Railway and I have noticed an issue. Everything works well, unless you click on go back button in the browser. Then application stops responsonding, you don't go back, and you can't even reload the page. Is this something I can configure not to happen? Maybe some timeout setting?
Our website: https://genai.works/
5 Replies
a year ago
``` ⨯ Error: The router state header was sent but could not be parsed.
at /app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:14296 at rD (/app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:14365)
at /app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:25097 at AsyncLocalStorage.run (node:asynchooks:338:14)
at Object.wrap (/app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:13:16241) at /app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:24987
at AsyncLocalStorage.run (node:asynchooks:338:14) at Object.wrap (/app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:13:15489)
at rB (/app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:24914) at r7.render (/app/nodemodules/next/dist/compiled/next-server/app-page.runtime.prod.js:16:28962)
```
a year ago
After investigation, it happens only with home page. And it can happen not only when going back\forward, but also with usual navigation via links.
Checking further
a year ago
I will keep struggling and share details as soon as I fix this issue. From my understanding it's connected to undocumented next.js behavior related to caching system or\and to server\client components division.
a year ago
So the reason was Lottie animation
Solution:
before:
in Lottie component
animationData={lottie}
after:
animationData={JSON.parse(JSON.stringify(lottie))}
just some weird bug of Lottie (lottie-react npm package)
Status changed to Solved railway[bot] • 12 months ago