{"record":{"id":"e18a679cf0e3b94b","repo":"vercel/next.js","slug":"getdisplayname-app-returned-an-empty-object-fr","errorCode":null,"errorMessage":"${getDisplayName(App)} returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps","messagePattern":"(.+?) returned an empty object from `getInitialProps`\\. This de-optimizes and prevents automatic static optimization\\. https://nextjs\\.org/docs/messages/empty-object-getInitialProps","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/shared/lib/utils.ts","lineNumber":414,"sourceCode":"    return {} as IP\n  }\n\n  const props = await App.getInitialProps(ctx)\n\n  if (res && isResSent(res)) {\n    return props\n  }\n\n  if (!props) {\n    const message = `\"${getDisplayName(\n      App\n    )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n    throw new Error(message)\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (Object.keys(props).length === 0 && !ctx.ctx) {\n      console.warn(\n        `${getDisplayName(\n          App\n        )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n      )\n    }\n  }\n\n  return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n  SP &&\n  (['mark', 'measure', 'getEntriesByName'] as const).every(\n    (method) => typeof performance[method] === 'function'\n  )\n\nexport class DecodeError extends Error {}","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/vercel/next.js/blob/89d017eac43ebf4742ed2b58d3c1373b70283b69/packages/next/src/shared/lib/utils.ts#L396-L432","documentation":"Error \"${getDisplayName(App)} returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps\" thrown in vercel/next.js.","triggerScenarios":"Thrown at packages/next/src/shared/lib/utils.ts:415 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove `getInitialProps` from _app if it returns an empty object, so automatic static optimization is not disabled."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89d017eac43ebf4742ed2b58d3c1373b70283b69","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}