Error AtlasError Documentation and Resolution

Next.js useSearchParams needs a Suspense boundary

useSearchParams() should be wrapped in a suspense boundary at page "...".

Reading useSearchParams in a statically rendered route can force client rendering up to the nearest Suspense boundary. Without that boundary, a production build can fail and the page may otherwise remain blank until JavaScript loads.

Missing Suspense boundary with useSearchParamsrendering
useSearchParams() should be wrapped in a suspense boundary at page "...".
  • A Client Component calls useSearchParams without an ancestor Suspense boundary.
  • A shared navigation or search component introduces the hook indirectly.
  1. Move the hook into a small child Client Component and wrap that child in Suspense with a useful fallback. The boundary must be above the component calling the hook.
  2. If the page intentionally needs request-time rendering, await connection() in a Server Component on versions supporting that API. On older versions, use the documented server-side dynamic rendering option.
  3. Do not set force-dynamic in a use client page expecting it to take effect. Re-run next build, because development rendering can conceal this static-rendering issue.
  4. Avoid disabling missingSuspenseWithCSRBailout as a general fix: that escape hatch only applies to Next.js 14.x.
Next.js official documentation