[Next.js 16] [App Router] searchParams empty on statically generated pages when Draft Mode is enabled (Vercel only)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://github.com/illiakovalenko/app-router-draft-mode-proxy-bug
To Reproduce
- Deploy application to Vercel
- Visit
<host>/api/renderurl
Current vs. Expected behavior
Current behaviour
I followed the documentation for draftMode and want to pass search parameters via redirect and access them on the page after I hit the route handler: https://nextjs.org/docs/app/guides/draft-mode#step-2-access-the-route-handler-from-your-headless-cms
On Next.js App Router v16 deployed to Vercel, searchParams are empty on a statically generated page, even when Draft Mode is enabled. The same setup works correctly on Next.js 15. This issue does not occur locally with next dev or next start - it only happens on Vercel production deployments.
The route handler redirects to: /test?language=en×tamp=1775717500894
Expected behaviour
When Draft Mode is enabled, the page should receive the full searchParams object, even if the route is statically generated. This allows the page to remain static (SSG) for normal traffic while switching to dynamic preview behavior in Draft Mode.
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Enterprise
Available memory (MB): 32213
Available CPU cores: 16
Binaries:
Node: 22.22.0
npm: 10.9.4
Yarn: 4.12.0
pnpm: 10.33.0
Relevant Packages:
next: 16.2.1-canary.29 // Latest available version is detected (16.2.1-canary.29).
eslint-config-next: N/A
react: 19.2.4
react-dom: 19.2.4
typescript: 5.9.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Draft Mode, Dynamic Routes
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed)
Additional context
I tested this using Next.js 15, and it becomes reproducible in Next.js 16.
The issue is reproducible when deployed to Vercel, but it does not occur locally.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked reproduction repository and trace the /api/render route handler, its redirect to /test, and how Draft Mode exposes searchParams. Compare Next.js 15 and 16 behavior in local and Vercel production deployments. Done means the deployed static page receives language and timestamp search parameters in Draft Mode without changing normal static behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js
- Domain
- api, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100