Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Intercepting & Parallel route on vercel is broken #74895

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

Open
heecheon92 opened this issue Jan 15, 2025 · 2 comments
Open

Intercepting & Parallel route on vercel is broken #74895

heecheon92 opened this issue Jan 15, 2025 · 2 comments
Labels
Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.

Comments

@heecheon92
Copy link

heecheon92 commented Jan 15, 2025

Link to the code that reproduces this issue

https://github.com/heecheon92/next15-test

To Reproduce

Local Build,

  1. npm i && npm run dev (or npm run start)

  2. visit localhost:3000

  3. visit the page -> Route Interception (or you can simply visit localhost:3000/playground/route_interception/home)

  4. Visit "Progress" tab from "Home" tab. (It displays as normal page)

  5. Visit "Progress" tab from "Payment" tab. (It displays as modal)

  6. deploy the product on vercel.

  7. visit the page -> Route Interception (or you can simply visit https://next15-test-gilt.vercel.app/playground/route_interception/home)

  8. Visit "Progress" tab from "Home" tab. (It should display as normal page)

  9. Visit "Progress" tab from "Payment" tab. (It should display as modal but it displays as normal page)

Current vs. Expected behavior

In local development and production build, intercepting & parallel route behaves as expected.

In local builds, regardless of dev or prod, visiting "Progress" tab from "Payment" tab display as modal.

Once deployed to vercel, visiting "Progress" tab from "Payment" tab displays as normal page.

It should be displayed as modal just like local build.

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:27 PDT 2024; root:xnu-11215.41.3~2/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 12
Binaries:
  Node: 20.10.0
  npm: 10.9.0
  Yarn: 1.22.21
  pnpm: 9.7.1
Relevant Packages:
  next: 15.1.4 // Latest available version is detected (15.1.4).
  eslint-config-next: 15.1.4
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.2
Next.js Config:
  output: N/A

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

Parallel & Intercepting Routes

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

Vercel (Deployed)

Additional context

One weird behavior pertaining to this issue is that "prefetch" on Link component is speculatively related.

From the sample project I provided, if you explicitly set prefetch option to "false" on Link to "Progress" tab, like this

          <Link
            href="/playground/route_interception/progress"
            className="p-2 bg-blue-600 text-white rounded-md"
            prefetch={false}      // <-- this option
          >
            Progress
          </Link>

This partially fixes the issue.

In detail, when prefetch is set to false and deployed to vercel, following happens

  1. Visit following pages with exact order "Home" -> "Payment" -> "Progress"
  2. Progress page displays as modal just like local build
  3. Close the modal, visit "Home" again and then visit "Progress"
  4. Now, Progress page shows "404 page not found"

Following page is built on exactly same source code but prefetch option for the Link to Progress page is set to false.

https://next15-test-git-prefetchdisabled-heecheon92s-projects.vercel.app/playground/route_interception/home

@heecheon92 heecheon92 added the bug Issue was opened via the bug report template. label Jan 15, 2025
@github-actions github-actions bot added the Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. label Jan 15, 2025
@samcx samcx removed the bug Issue was opened via the bug report template. label Jan 16, 2025
@nekode-dev
Copy link

+1, I am experiencing the exact same as you.

Interestingly though, I have one intercepting route using the (.) matcher and this does work as expected on dev, start, and when deployed to Vercel. All of my other intercepting routes are using the (..)(..) and (...) matchers, and it is these that work as expected on dev and start but they don't work when deployed to Vercel.

@ttavni

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.
Projects
None yet
Development

No branches or pull requests

4 participants