vercel/next.js · error
Your `getServerSideProps` function did not return an object.
Error message
Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?
What it means
Renders the GSSP_NO_RETURNED_VALUE invariant in renderToHTMLImpl: after awaiting the user's getServerSideProps the resolved data is null/undefined. The input at fault is the function's return value — usually a forgotten return or an early code path that returns nothing — which cannot be turned into page props.
Source
Thrown at packages/next/src/server/render.tsx:1140
defaultLocale: renderOpts.defaultLocale,
})
)
canAccessRes = false
metadata.cacheControl = { revalidate: 0, expire: undefined }
} catch (serverSidePropsError: any) {
// remove not found error code to prevent triggering legacy
// 404 rendering
if (
isError(serverSidePropsError) &&
serverSidePropsError.code === 'ENOENT'
) {
delete serverSidePropsError.code
}
throw serverSidePropsError
}
if (data == null) {
throw new Error(GSSP_NO_RETURNED_VALUE)
}
if ((data as any).props instanceof Promise) {
deferredContent = true
}
const invalidKeys = Object.keys(data).filter(
(key) => key !== 'props' && key !== 'redirect' && key !== 'notFound'
)
if ((data as any).unstable_notFound) {
throw new Error(
`unstable_notFound has been renamed to notFound, please update the field to continue. Page: ${pathname}`
)
}
if ((data as any).unstable_redirect) {
throw new Error(
`unstable_redirect has been renamed to redirect, please update the field to continue. Page: ${pathname}`View on GitHub (pinned to 89d017eac4)
Solutions
- Make `getServerSideProps` return an object, e.g. `return { props: {} }`.
- Check all code paths (including early returns and error branches) return an object.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/next/src/server/render.tsx:1142 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19).
Data as JSON: /api/errors/17224cc9ca02c6ae.
Report an issue: GitHub.