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

unstable_cache broken on Vercel when non english searchParams present in URL #76286

Open
nickjackson opened this issue Feb 20, 2025 · 0 comments

Comments

@nickjackson
Copy link

nickjackson commented Feb 20, 2025

Link to the code that reproduces this issue

https://github.com/cygnetdigital/next-unstable-cache-bug-repro

To Reproduce

  1. Deploy the application to Vercel (or visit the link below).
  2. Visit the URL https://unstable-cache-repro.vercel.app/?key=bar&extra=english. The utcTime will remain static as you refresh the page.
  3. Now add an unrelated non-english search param. https://unstable-cache-repro.vercel.app/?key=bar&extra=中國人. Notice how the utcTime is increasing for every page refresh.

Current vs. Expected behavior

The repro does not consume the extra searchParam anywhere in the application, yet when any non english searchParam is in the URL it can break unstable_cache.

Looking at the vercel request logs, it's as if there is no attempt to visit the vercel data cache. Perhaps the unstable_cache is bailing and just invoking the callback on every request when this condition occurs.

Provide environment information

Node.js v20.18.0

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 18:40:14 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8103
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 20.18.0
  npm: 10.8.2
  Yarn: 3.2.3
  pnpm: N/A
Relevant Packages:
  next: 14.2.24 // An outdated version detected (latest is 15.1.7), upgrade is highly recommended!
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.3

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

Not sure

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

Vercel (Deployed)

Additional context

I have tested the following next.js versions.

  • 14.1.4 - bug NOT present
  • 14.2.15 - bug present
  • 14.2.24 - bug present
  • 15.1.7 - bug present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant