Replies: 1 comment
-
Since v15, https://nextjs.org/docs/app/api-reference/functions/cookies, cookies is an asynchronous call, that resolves to the cookie store **
** There's temporary support to use these synchronously in 15, but the combination of TypeScript support and ongoing feature development makes it a bit hard to land, the more 15 releases happen - like usually, I see people running into this during deploy/build time, cuz during dev things seemingly work fine, although IIRC, there are warnings printed to console. So in src/lib/supabase/server.ts you should await the cookies, and make the create function into async - or you could rework the associated methods to await for the store... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Experiencing "Route used cookies().get(...). cookies() should be awaited" error in Next.js 15.3.3 App Router with @supabase/ssr, even though cookies() is synchronous. This happens on page loads and Server Actions.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions