Skip to content

params.auth0, cookies().getAll(), and cookies().set('appSession', ...). cookies() should be awaited errors - Next 15.0.2 #1802

Closed
@sterno2510

Description

@sterno2510

Checklist

Description

When using the getSession function imported from auth0/nextjs-auth0, I get a few errors in the console when the app compiles.

Specifically these 3:

  1. Error: Route "/dashboard" used cookies().getAll(). cookies() should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
  2. Error: Route "/dashboard" used cookies().set('appSession', ...). cookies() should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
  3. Error: Route "/api/auth/[auth0]" used params.auth0. params should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis

All three errors appear to be coming from here:

at get (file:///Users/brianstern/code/ai-companion-next/node_modules/next/src/server/base-server.ts:3121:48)

  29 |     ...args: A
  30 |   ): ReturnType<F> {
> 31 |     return fn.call(thisArg, ...args);
     |              ^
  32 |   }
  33 |
  34 |   bind<T>(_context: types.Context, target: T): T {

Reproduction

  1. Use getSession()
  2. Run app with npm run dev
  3. Go to route and errors appear in console.

Additional context

No response

nextjs-auth0 version

3.5.0

Next.js version

15.0.2

Node.js version

22.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions