You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unstable_cache serializes everything and everything works.
All logs are output to the console
Try entering mail in the field with unstable_cache
Try to enter mail again in the field with unstable_cache and look at the logs (make sure there are no errors)
Try to enter the mail again in the “use cache” field and make sure that the error pops up.
Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.
[{}]
^^
at stringify (<anonymous>)
Error while saving cache key: ["development","c04d358ed385c8992fa9fcf45e6ff96556234302f3",[{"ctx":{},"type":"query","path":"user.getByEmail","rawInput":"oxmaster@gmail.com","meta":"$undefined","input":"oxmaster@gmail.com","next":"$T"}]] Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.
[{}]
^^
BONUS:
Try replacing <main> in page.tsx with a fragment (empty tag) and make sure the error does not correspond to reality
Current vs. Expected behavior
Current: error
Expected: no error
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 16320
Available CPU cores: 6
Binaries:
Node: 22.10.0
npm: 10.9.0
Yarn: N/A
pnpm: 9.12.2
Relevant Packages:
next: 15.0.4-canary.22 // Codesandbox: (15.0.4-canary.23)
eslint-config-next: 15.0.0
react: 19.0.0-rc-380f5d67-20241113
react-dom: 19.0.0-rc-380f5d67-20241113
typescript: 5.7.1-rc
Next.js Config:
output: standalone
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
An unexplained error is displayed when trying to serialize a value. But “use cache” cannot serialize it, although unstable_cache serializes everything fine
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/keen-cloud-gggnf4?embed=1
To Reproduce
unstable_cache serializes everything and everything works.
All logs are output to the console
BONUS:
<main>
inpage.tsx
with a fragment (empty tag) and make sure the error does not correspond to realityCurrent vs. Expected behavior
Current: error
Expected: no error
Provide environment information
Which area(s) are affected? (Select all that apply)
dynamicIO
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
An unexplained error is displayed when trying to serialize a value. But
“use cache”
cannot serialize it, althoughunstable_cache
serializes everything fineThe text was updated successfully, but these errors were encountered: