nextjs - 💡(How to fix) Fix Bug with Parallel Routes and Params [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85045Fetched 2026-04-08 02:17:37
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1issue_type_added ×1

Code Example

const resolvedParams = await params;
//      ^?  === { assetId: string }

---

const resolvedParams = await params;
//      ^?  === [ assetId, pathPart ]

---

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32679
  Available CPU cores: 32
Binaries:
  Node: 22.20.0
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 15.5.4 // There is a newer version (15.5.6) available, upgrade recommended! 
  eslint-config-next: 15.5.4
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

]]

To Reproduce

Shown in the below screenshot, I am trying to make a Layout that has a {header} and a {sidebar}. I want to reuse this layout in different areas of my site but I want to swap out the sidebar for different areas.

I also want a Page to ideally control what goes in the header section, but didn't find a good way to do that so I resorted to setting up the same parallel route slot for the header.

The below code works as in my pages load up... See below for issue and expected behaviour.

<img width="2332" height="890" alt="Image" src="https://github.com/user-attachments/assets/8d9df944-533a-4012-b12c-5b334043c243" />

Current vs. Expected behavior

My code setup allows me to navigate to any of the sub pages directly and have the header / sidebar update as I change page, but the layout be controlled in 1 file.

As you can see, I have an [assetId] for the main pages, but in an attempt to catch-all for the sidebar I created a [...assetId].

Given the documentation, I would expect the below

Page

const resolvedParams = await params;
//      ^?  === { assetId: string }

Sidebar [...assetId]

const resolvedParams = await params;
//      ^?  === [ assetId, pathPart ]

In both instances they are coming back as an object.


Note: I tried my setup using a default.tsx for the sidebar, but it doesn't change to the default when I deep link into the page.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32679
  Available CPU cores: 32
Binaries:
  Node: 22.20.0
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.18.3
Relevant Packages:
  next: 15.5.4 // There is a newer version (15.5.6) available, upgrade recommended! 
  eslint-config-next: 15.5.4
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3
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)

next dev (local)

Additional context

I am not sure if this is the correct way to build what I want, so providing the below as an example

I don't want to load in data in the sidebar / header if the content is the same ideally for page speed, so through parallel routes was the win here

<img width="1640" height="897" alt="Image" src="https://github.com/user-attachments/assets/8f8e51e0-f882-43d3-9a18-6a0c22c67724" />

extent analysis

TL;DR

The issue can be resolved by correctly handling the params object in the [...assetId] sidebar route and potentially upgrading to the latest version of Next.js.

Guidance

  • Verify that the params object is being correctly passed to the [...assetId] sidebar route and that it contains the expected assetId and pathPart values.
  • Check the Next.js documentation for the correct way to handle catch-all routes and parameter parsing.
  • Consider upgrading to the latest version of Next.js (15.5.6) as recommended in the environment information section.
  • Review the code for the parallel routes and ensure that the layout is correctly configured to reuse the header and sidebar components.

Notes

The issue seems to be related to the handling of catch-all routes and parameter parsing in Next.js. Without more information about the code, it's difficult to provide a more specific solution. Upgrading to the latest version of Next.js may resolve the issue, but it's also important to verify that the code is correctly handling the params object.

Recommendation

Apply workaround: The user should first try to correctly handle the params object in the [...assetId] sidebar route before considering an upgrade to the latest version of Next.js. This will help to determine if the issue is related to the code or the version of Next.js being used.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING