{"record":{"id":"9e9d9e850854d598","repo":"vercel/next.js","slug":"unexpected-cache-miss-after-cache-warming-phase-du","errorCode":null,"errorMessage":"Unexpected cache miss after cache warming phase during prerendering. This is likely caused by non-deterministic arguments that differ between the cache warming phase and the final prerender phase (e.g. unstable array order). Ensure that arguments passed to cached functions are deterministic.","messagePattern":"Unexpected cache miss after cache warming phase during prerendering\\. This is likely caused by non-deterministic arguments that differ between the cache warming phase and the final prerender phase \\(e\\.g\\. unstable array order\\)\\. Ensure that arguments passed to cached functions are deterministic\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/use-cache/use-cache-wrapper.ts","lineNumber":2732,"sourceCode":"            return makeRuntimeHangingPromise(\n              workUnitStore.renderSignal,\n              workStore.route,\n              'dynamic \"use cache\"',\n              workUnitStore\n            )\n          }\n        // fallthrough\n        case 'prerender-runtime':\n          if (!cacheSignal) {\n            // This is the final prerender (cacheSignal is null), which means\n            // all caches should have been warmed during the prospective\n            // prerender. A cache miss here indicates that the cache key is\n            // non-deterministic (e.g. due to unstable array order in the\n            // arguments). Known dynamic keys (e.g. from fallback params) are\n            // already handled by the early return above. We return a hanging\n            // promise so this becomes a dynamic hole rather than generating a\n            // broken cache entry that gets aborted.\n            console.warn(\n              new Error(\n                `Unexpected cache miss after cache warming phase during prerendering. This is likely caused by non-deterministic arguments that differ between the cache warming phase and the final prerender phase (e.g. unstable array order). Ensure that arguments passed to cached functions are deterministic.`\n              )\n            )\n            // This is an anomaly (non-deterministic cache key), so we can't\n            // know whether a runtime prerender would resolve it. Treat it as\n            // runtime data, conservatively: the cost is at most a redundant\n            // runtime prefetch request.\n            return makeRuntimeHangingPromise(\n              workUnitStore.renderSignal,\n              workStore.route,\n              'dynamic \"use cache\"',\n              workUnitStore\n            )\n          }\n          break\n        case 'prerender-legacy':\n        case 'request':","sourceCodeStart":2714,"sourceCodeEnd":2750,"githubUrl":"https://github.com/vercel/next.js/blob/258b1c1bc05f7099816b88f70b7b3422b24a4b8d/packages/next/src/server/use-cache/use-cache-wrapper.ts#L2714-L2750","documentation":"Error \"Unexpected cache miss after cache warming phase during prerendering. This is likely caused by non-deterministic arguments that differ between the cache warming phase and the final prerender phase (e.g. unstable array order). Ensure that arguments passed to cached functions are deterministic.\" thrown in vercel/next.js.","triggerScenarios":"Thrown at packages/next/src/server/use-cache/use-cache-wrapper.ts:2754 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass deterministic, stably ordered arguments to cached functions so the warming phase and prerender phase produce the same cache keys."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"258b1c1bc05f7099816b88f70b7b3422b24a4b8d","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}