Initialized NextJS15 project and installed Kinde library.
Run npm run dev
Access a dynamic route (ie. /app/chat-history/[id].tsx).
Error: cookies was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context at getExpectedRequestStore (file:///home/kris/Dev/ai/admin/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js:48:11) at cookies (webpack-internal:///(rsc)/./node_modules/next/dist/server/request/cookies.js:66:84) at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:15219) at p (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:1747) at Generator.eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:3093) at Generator.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:2176) at j (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:8211) at a (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:8414) at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:8473) at new Promise (<anonymous>)
Prerequisites
Describe the issue
Initialized NextJS15 project and installed Kinde library.
npm run dev
Error: cookies was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context at getExpectedRequestStore (file:///home/kris/Dev/ai/admin/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js:48:11) at cookies (webpack-internal:///(rsc)/./node_modules/next/dist/server/request/cookies.js:66:84) at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:15219) at p (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:1747) at Generator.eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:3093) at Generator.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:2176) at j (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:8211) at a (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:8414) at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:22:8473) at new Promise (<anonymous>)
Library URL
https://github.com/kinde-oss/kinde-auth-react
Library version
2.4.6
Operating system(s)
Ubuntu
Operating system version(s)
PopOS 22.04
Further environment details
Node v22.9.0
Reproducible test case URL
NA (localhost)
Additional information
No response