vercel/next.js · error · Error
"${getDisplayName(App)}.getInitialProps()" should resolve to
Error message
"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead. What it means
Thrown by loadGetInitialProps after awaiting App.getInitialProps(ctx): the resolved value was falsy (null or undefined) rather than a plain object. The input at fault is whatever the app's (or page's) getInitialProps returned — typically a missing return statement — so the props object the renderer needs does not exist.
Source
Thrown at packages/next/src/shared/lib/utils.ts:409
// @ts-ignore pageProps default
return {
pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),
}
}
return {} as IP
}
const props = await App.getInitialProps(ctx)
if (res && isResSent(res)) {
return props
}
if (!props) {
const message = `"${getDisplayName(
App
)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`
throw new Error(message)
}
if (process.env.NODE_ENV !== 'production') {
if (Object.keys(props).length === 0 && !ctx.ctx) {
console.warn(
`${getDisplayName(
App
)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`
)
}
}
return props
}
export const SP = typeof performance !== 'undefined'
export const ST =
SP &&View on GitHub (pinned to 89d017eac4)
Solutions
- Return a plain object from getInitialProps.
Defensive patterns
Strategy: validation
When it happens
Trigger: App.getInitialProps resolves to a non-object value.
Common situations: Returning null, a promise of a primitive, or forgetting to return from getInitialProps.
AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19).
Data as JSON: /api/errors/6f254f63a6e61bd7.
Report an issue: GitHub.