Error while saving cache key
Answered
yolocat posted this in #help-forum
yolocatOP
Using Next.js
Minimal version for reproduction:
15.1.1-canary19
with dynamicIO
enabled.Error while saving cache key: 1:071:["development","...",[{"params":"$@1","searchParams":"$@2"},"$undefined"]]1:12:{} [Error: Connection closed.]
Minimal version for reproduction:
// app/auth/error/page.tsx
export default async function AuthError({ searchParams }: { searchParams: Promise<{ [key: string]: string | string[] | undefined; }>; } ) {
"use cache";
const { error } = await searchParams;
return (
<span>{typeof error === "string" ? error : "Unknown error"}</span>
);
}
Answered by yolocat
Promise
s can't be serialized into JSON correctly, which is required for use cache
to generate a cache key1 Reply
yolocatOP
Promise
s can't be serialized into JSON correctly, which is required for use cache
to generate a cache keyAnswer