Bug: (getKindeServerSession throws an error in generateStaticParams)
Closed this issue · 1 comments
princemuel commented
Prerequisites
- I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate
- I have checked the latest version of the library to replicate my issue
- I have read the contributing guidelines
- I agree to the terms within the code of conduct
Describe the issue
When using the getUser function from getKindeServerSession to get the user id in generateStaticParams (Nextjs 14.0.2 App Router) inside nested page route (/posts/[slug]), it throws this error... (Error: Invariant: cookies() expects to have requestAsyncStorage, none available)
Library URL
https://github.com/kinde-oss/kinde-auth-nextjs
Library version
1.8.25
Operating system(s)
Ubuntu
Operating system version(s)
22.04
Further environment details
Node v20
Firefox v118
Reproducible test case URL
No response
Additional information
princemuel commented
Oh, its fixed in version 2