Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Internal Server Error on dynamic routes with %25 in the dynamic param with cacheComponents enabled | GoodFirstPicks

Internal Server Error on dynamic routes with %25 in the dynamic param with cacheComponents enabled

vercel/next.js 2 comments 21d ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeNext.jsTypeScriptReact

Why this is a good first issue

URL decoding issue in dynamic routes with cacheComponents enabled.

AI Summary

The issue occurs when navigating to dynamic routes containing '%25' with cacheComponents enabled, causing a 500 Internal Server Error. The problem involves URL decoding logic in the caching mechanism. The fix requires ensuring the parameter is not prematurely decoded.

Issue Description

Link to the code that reproduces this issue

https://github.com/therungg/next-percentage-cache-bug-repro

To Reproduce

  1. Enable cacheComponents in next.config.ts
  2. Create a dynamic route
  3. Start the application with npm run build && npm run start (it is not reproducable with npm run dev)
  4. Navigate to http://localhost:3000/%25
  5. Page breaks

Any dynamic route with %25 in the parameter breaks. %24 or other url encoded characters work fine.

Breaks on both Turbopack and Webpack

Disabling cacheComponents removes the bug

Current vs. Expected behavior

When navigating to a dynamic route with a %25 anywhere in the dynamic parameter, and I have cacheComponents enabled, it will give a 500 Internal Server Error.

I expect the page to load fine and to url-decode the character correctly to %.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 8937
  Available CPU cores: 16
Binaries:
  Node: 22.13.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.0.0
Relevant Packages:
  next: 16.1.0-canary.16 // Latest available version is detected (16.1.0-canary.16).
  eslint-config-next: N/A
  react: 19.2.1
  react-dom: 19.2.1
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

cacheComponents

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

next start (local)

Additional context

No response

GitHub Labels

Cache Components

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • requires understanding of URL decoding
  • cacheComponents feature
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno