defaultCookies is not defined
See original GitHub issueQuestion 💬
Hi I’m using next-auth version: 3.27.3 I suddenly got this error while running my app. Anyone encountered this? Thank you.
error - unhandledRejection: ReferenceError: defaultCookies is not defined
at C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next-auth\dist\server\index.js:102:9
at new Promise (<anonymous>)
at NextAuthHandler (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next-auth\dist\server\index.js:67:10)
at NextAuth (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next-auth\dist\server\index.js:299:10)
at __WEBPACK_DEFAULT_EXPORT__ (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\.next\server\pages\api\auth\[...nextauth].js:188:128)
at Object.apiResolver (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next\dist\server\api-utils.js:101:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async DevServer.handleApiRequest (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next\dist\server\next-server.js:775:9)
at async Object.fn (C:\Users\MAGICSOFT Mike\Desktop\NEW MAGICSOFT\crd-prototype\node_modules\next\dist\server\next-server.js:666:37)
How to reproduce ☕️
npm run dev
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Next-Auth : defaultCookies is not defined - Stack Overflow
I'm using next/auth version: 3.27.3 I suddenly got this error while running my app. Anyone encountered this? error - unhandledRejection: ...
Read more >Errors - NextAuth.js
Errors. This is a list of errors output from NextAuth.js. All errors indicate an unexpected problem, you should not expect to see errors....
Read more >WebClient.Builder (Spring Framework 6.0.3 API)
Provides access to every defaultCookie(String, String...) declared so far with the possibility to add, replace, or remove. WebClient.Builder.
Read more >Work with SameSite cookies in ASP.NET - Microsoft Learn
Setting it equal to (SameSiteMode)(-1) indicates that no SameSite header should be included on the network with the cookie. The HttpCookie.
Read more >Upcoming changes in cookie handling in Google Chrome
"SameSite by default cookies"; "Cookies without SameSite must be secure ... When this attribute is not defined, currently all browsers allow ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, v3 is an unmaintained version. Please upgrade to v4 and report back if you still experience the issue.
Same error here, nothing changed on the codebase (and using older v3), my client just did another deploy due to CMS updates. This is unacceptable.
EDIT I downgraded
next-auth
explicitly to version3.29.3
(was^3.29.3
before) and now it works!