Issue with Soft Navigation in NextJS Application Under Reverse Proxy #54751
Unanswered
thulasi-rajasekaran
asked this question in
Help
Replies: 4 comments
-
I have the same issue on Railway 'The router state header was sent but could not be parsed'. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The same, any hints? |
Beta Was this translation helpful? Give feedback.
0 replies
-
any updates here? I have similar error only when deploying on AWS |
Beta Was this translation helpful? Give feedback.
0 replies
-
Same issue here deploying on AWS. Ping Ping Ping |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I am currently working on an application hosted under our organization's domain, members.example.com, which houses multiple applications. This application is built using NextJS and is intended to be accessed via members.example.com/dashboard/v2/accounts. However, I'm encountering an issue with our reverse proxy.
The reverse proxy is appending a locale prefix to the basepath when call (but not in URL), resulting like /en-us/dashboard/v2/accounts (but browser URL is still like /dashboard/v2/accounts). Since this locale prefix is dynamic, I cannot use a base path variable. To address this, I've implemented a rewrite rule within my application to remove the locale prefix. This solution works well for most aspects of the application.
Folder Structure:
Here's a simplified folder structure of my application:
app
sample
The Issue:
I've set up a soft link using the Link attribute in the root page to navigate to the sample page. However, I'm facing an issue with soft navigation:
Production Build (npm run start): Soft navigation works as expected; pages load without a complete reload.
Development Mode (npm run dev): Soft navigation is not working; the page undergoes a complete reload.
Upon further investigation, I noticed the following error:
http://localhost:3000/dashboard/v2/accounts/sample?_rsc= request failed with 'The router state header was sent but could not be parsed'.
This issue is causing a significant blocker for us in finalizing the framework for our application.
Request for Assistance:
Could someone please suggest a fix or workaround for this soft navigation issue in development mode? Your assistance in resolving this problem would be greatly appreciated.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions