Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intercepting + Dynamic Routes, Jumping the page causes a forced refresh #873

Closed
zhengzhu-1m opened this issue Feb 20, 2024 · 6 comments
Closed
Labels
bug Something isn't working Stale unconfirmed Needs triage. upstream-issue This issue is caused by an upstream dependency (e.g. Next.js)

Comments

@zhengzhu-1m
Copy link

zhengzhu-1m commented Feb 20, 2024

Description

Note:

  1. The bug will only be triggered in the vercel deployment environment
  2. The local development environment works normally
  3. If you don't use the next-intl library, it works fine

Mandatory reproduction URL

https://github.com/bosinc/next-bug

Reproduction description

Steps to reproduce:

  1. https://next-bug-vert.vercel.app
  2. click Page any button

Expected behaviour

Retain the multi-language mode, intercept routes will work normally, and will not force a refresh of the page

@zhengzhu-1m zhengzhu-1m added bug Something isn't working unconfirmed Needs triage. labels Feb 20, 2024
@amannn
Copy link
Owner

amannn commented Feb 20, 2024

Possibly another instance of #255, it's unclear to me if there's anything next-intl can do here. This might be something that needs to be addressed upstream in Next.js.

@amannn amannn added the upstream-issue This issue is caused by an upstream dependency (e.g. Next.js) label Feb 20, 2024
@huyitan
Copy link

huyitan commented Feb 21, 2024

I have same issues on the production build.
Development work fine.

@tquann286
Copy link

Same, interception routes work fine in development mode, but it causes hard navigation on production

@huyitan
Copy link

huyitan commented Mar 14, 2024

i think this bug is caused by nextJS config build. It's rewrite route " /:locale/signal/:id" to "/NEXT_EMPTY_PARAM/(.)signal/:id", missing "locale" param. Then we use 

unstable_setRequestLocale, which throws an error when nextjs prefetch Intercepting routes.

Rewrites

┌ source: /:locale/signal/:id
└ destination: /__NEXT_EMPTY_PARAM__/(.)signal/:id

Workaround for me: remove unstable_setRequestLocale (pages will opt into dynamic rendering)

@sayandedotcom
Copy link

any update??

Copy link

This issue has been automatically closed because there was no recent activity and it was marked as unconfirmed. Note that issues are regularly checked and if they remain in unconfirmed state, they might miss information required to be actionable or are potentially out-of-scope. If you'd like to discuss this topic further, feel free to open a discussion instead.

@github-actions github-actions bot added the Stale label Apr 30, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale unconfirmed Needs triage. upstream-issue This issue is caused by an upstream dependency (e.g. Next.js)
Projects
None yet
Development

No branches or pull requests

5 participants