Next.js · sdk · fg-0309

params.id is undefined after upgrading to Next.js 16 because params and searchParams are Promises

params.slug is undefined in a page that worked on Next.js 14

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

Next.js 15 turned params, searchParams, cookies(), headers() and draftMode() into Promises but kept a synchronous fallback with a warning. Next.js 16 removed that fallback, so property reads on the raw prop return undefined.

Fix

Await the prop in Server Components and unwrap it with React.use() in Client Components. Run the async request API codemod, since the general upgrade codemod skips it.

Apply

npx @next/codemod@canary next-async-request-api .

export default async function Page(props: PageProps<'/blog/[slug]'>) {
  const { slug } = await props.params
}

Affects: Next.js 15 (warning) and 16 (sync access removed); also opengraph-image, icon and sitemap id params in 16

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp