Error in Nextjs 15

This is the error in the server console;
Error: Route “/api/auth/[auth0]” used params.auth0. params should be awaited before using its properties. Learn more: Dynamic APIs are Asynchronous | Next.js
at createParamsAccessError (webpack://next/dist/src/server/request/params.ts:467:9)
at getMessage (webpack://next/dist/src/server/create-deduped-by-callsite-server-error-logger.ts:46:20)
at warnForSyncAccess (webpack://next/dist/src/server/request/params.ts:445:4)
at syncIODev (webpack://next/dist/src/server/request/params.ts:403:10)
at (node_modules/@auth0/nextjs-auth0/src/handlers/auth.ts:210:23)
at (node_modules/@auth0/nextjs-auth0/src/handlers/auth.ts:197:15)
at run (webpack://next/dist/src/server/route-modules/app-route/module.ts:529:41)
at handler (webpack://next/dist/src/server/route-modules/app-route/module.ts:725:18)
at fn (node_modules/next/src/server/lib/trace/tracer.ts:351:27)
at NoopContextManager.with (/Users/macbookpro/Desktop/odiisea/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7062)
at ContextAPI.with (/Users/macbookpro/Desktop/odiisea/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:518)
at NoopTracer.startActiveSpan (/Users/macbookpro/Desktop/odiisea/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18093)
at ProxyTracer.startActiveSpan (/Users/macbookpro/Desktop/odiisea/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18854)
at startActiveSpan (node_modules/next/src/server/lib/trace/tracer.ts:304:31)
at NoopContextManager.with (/Users/macbookpro/Desktop/odiisea/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7062)
at ContextAPI.with (/Users/macbookpro/Desktop/odiisea/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:518)
at spanContext (node_modules/next/src/server/lib/trace/tracer.ts:303:24)
at trace (webpack://next/dist/src/server/route-modules/app-route/module.ts:715:26)
at run (webpack://next/dist/src/server/route-modules/app-route/module.ts:662:32)
at run (webpack://next/dist/src/server/route-modules/app-route/module.ts:661:34)
at run (webpack://next/dist/src/server/route-modules/app-route/module.ts:658:60)
at handle (node_modules/next/src/server/base-server.ts:2504:47)
at doRender (node_modules/next/src/server/base-server.ts:3027:27)
at responseGenerator (node_modules/next/src/server/response-cache/index.ts:67:13)
at get (node_modules/next/src/server/base-server.ts:3039:48)
at async DevServer.renderPageComponent (node_modules/next/src/server/base-server.ts:3597:15)
at async DevServer.renderToResponseImpl (node_modules/next/src/server/base-server.ts:3659:23)
at async DevServer.pipeImpl (node_modules/next/src/server/base-server.ts:1698:20)
at async NextNodeServer.handleCatchallRenderRequest (node_modules/next/src/server/next-server.ts:1034:6)
at async DevServer.handleRequestImpl (node_modules/next/src/server/base-server.ts:1462:8)
at async (node_modules/next/src/server/dev/next-dev-server.ts:514:13)
at async Span.traceAsyncFn (node_modules/next/src/trace/trace.ts:143:13)
at async DevServer.handleRequest (node_modules/next/src/server/dev/next-dev-server.ts:512:19)
at async invokeRender (node_modules/next/src/server/lib/router-server.ts:284:10)
at async handleRequest (node_modules/next/src/server/lib/router-server.ts:530:15)
at async requestHandlerImpl (node_modules/next/src/server/lib/router-server.ts:576:6)
at async Server.requestListener (node_modules/next/src/server/lib/start-server.ts:146:6)
465 | ) {
466 | const prefix = route ? Route "${route}" : 'This route ’

467 | return new Error(
| ^
468 | ${prefix}used ${expression}. +
469 | \params` should be awaited before using its properties. + 470 | Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`
GET /api/auth/me 200 in 3734ms

Hi @uprizingFaze!

Welcome to the Auth0 Community!

We plan to address this in the v4 release of the Next.js SDK. The beta version of v4 (with Next 15 support) is out. Please see here: @auth0/nextjs-auth0 - npm

Please also see this relevant GitHub issue: Support async API required by Next 15 · Issue #1779 · auth0/nextjs-auth0 · GitHub

Please let me know if you have any additional questions!

Best,

Mary Beth

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.