This is issue is very hard to reproduce, so I added a link to the gist with __NEXT_DATA__ that demonstrates the problem. It works normally in our staging environment, and occasionally occur in production (around 5-10% are affected in general).
We started facing this issue after switching to the React 18. Note that with React 17 we never had a single issue. More details on the bug are in the next section.
Describe the Bug
One of our pages has the following path structure: /problem/[slug]/[[...tab]], and it serves ISR with { fallback: true }. These pages are quite high-loaded and during peak times may receive more than 100 requests per second. Whenever users request the pages where SSG page wasn't built and stored in the cache yet, they occasionally face runtime errors caused by the Next Dynamic Routing that resolves [slug] and [[...tab]] parameters as "[slug]" and "[[...tab]]" respectively.
We're not able to reproduce this issue on staging nor understand why Next might behave like that, and troubleshooting it in the production is simply unacceptable. Would appreciate your help troubleshooting this.
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue
https://gist.github.com/davletovalmir/14e9e6a01461356faed708488c88204c
To Reproduce
This is issue is very hard to reproduce, so I added a link to the gist with
__NEXT_DATA__
that demonstrates the problem. It works normally in our staging environment, and occasionally occur in production (around 5-10% are affected in general).We started facing this issue after switching to the React 18. Note that with React 17 we never had a single issue. More details on the bug are in the next section.
Describe the Bug
One of our pages has the following path structure:
/problem/[slug]/[[...tab]]
, and it serves ISR with{ fallback: true }
. These pages are quite high-loaded and during peak times may receive more than 100 requests per second. Whenever users request the pages where SSG page wasn't built and stored in the cache yet, they occasionally face runtime errors caused by the Next Dynamic Routing that resolves[slug]
and[[...tab]]
parameters as"[slug]"
and"[[...tab]]"
respectively.We're not able to reproduce this issue on staging nor understand why Next might behave like that, and troubleshooting it in the production is simply unacceptable. Would appreciate your help troubleshooting this.
__NEXT_DATA__
content of the crashing page is here for reference: https://gist.github.com/davletovalmir/14e9e6a01461356faed708488c88204cExpected Behavior
Next Dynamic Routes resolve parameters properly, without passing their names with brackets as values.
Which browser are you using? (if relevant)
Chrome, Firefox, Safari
How are you deploying your application? (if relevant)
next build
The text was updated successfully, but these errors were encountered: