Next.js: params, searchParams, or cookies() must be awaited

The build warns that params, searchParams, cookies(), or headers() was used like a plain object? In Next.js 15 those APIs are async.

Reviewed October 15, 2026

What it means in plain English

Next.js 15 made several request APIs asynchronous. The warning shows up when code reads params.id, spreads searchParams, or calls cookies(), headers(), or draftMode() as if they returned a value immediately. Next.js says those APIs are now promises.

Likely causes

  • A page still uses function Page({ params }) and then reads params.id.
  • A cookie check runs in a function that is not async.
  • The code enumerates the value, such as {...params} or Object.keys(params), which Next.js also treats as a sync read.

How to fix it, step by step

  1. On the server, make the function async and await the API before reading a property. Next.js's example is const { id } = await params.
  2. In a Client Component, unwrap the promise with React.use(). Next.js shows const { id } = React.use(params) inside a file that starts with 'use client'.
  3. Many call sites can be updated with the codemod Next.js documents: npx @next/codemod@canary next-async-request-api . Next.js says the codemod cannot cover every case, and a leftover @next-codemod-error comment has to be fixed by hand or the build will fail.
  4. You can wait to unwrap the promise until the value is actually needed. Next.js says that lets more of the page stay static.

How to check it worked

  • next build no longer warns about a sync dynamic API.
  • A dynamic route still receives its id, and a cookie check still sees the session cookie.

Sources

More Next.js errors fixes

Keep going on your own.

The guides stay free. A deep leak report is $15. Fix packs are $24, or $49 for all three. There is no done-for-you repair.

See products