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 #62207

Closed
zhengzhu-1m opened this issue Feb 18, 2024 · 2 comments · Fixed by #64923
Closed

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

zhengzhu-1m opened this issue Feb 18, 2024 · 2 comments · Fixed by #64923
Labels
bug Issue was opened via the bug report template. locked Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.

Comments

@zhengzhu-1m
Copy link

Link to the code that reproduces this issue

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

To Reproduce

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

Current vs. Expected behavior

When accessing dynamic interception routes, the page will be forced to refresh.
Note:

  1. The bug will only be triggered in the vercel deployment environment
  2. The local development environment works normally

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:27 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T8103
Binaries:
  Node: 18.18.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 8.15.3
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Not sure

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed)

Additional context

No response

@ericmatthys
Copy link
Contributor

I have come across a similar issue and found that I can reproduce it locally when using the edge runtime, but with the nodejs runtime it only seems to happen when deployed to Vercel.

@balazsorban44 balazsorban44 added the Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. label Apr 19, 2024
ztanner added a commit that referenced this issue Apr 23, 2024
…are (#64923)

We currently have logic spread in multiple places that normalize `nxtP`
parameters into their regular names, ie `nxtPfoo` -> `foo`. However we
don't apply this same logic to `nxtI`, which conceptually is another
parameter but for route interception. As a result, the interception
route would 404 when deployed because it'd be missing the interception
parameter.

This moves the normalization check into a util and updates the spots I
could find where we handle `nxtP` to also handle `nxtI`.

### Test Plan
Added a new test, and validated via these deploys:

**Working**:
[Link](https://vtest314-e2e-tests-m889gxi4p-vtest314-ijjk-testing.vercel.app/)
**Non-Working**:
[Link](https://vtest314-e2e-tests-8sa5t9uau-vtest314-ijjk-testing.vercel.app/)

Fixes #62207
Closes NEXT-3204
Copy link
Contributor

github-actions bot commented May 9, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot added the locked label May 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants