You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_payload.json-isr 404 on ISR routes deployed to Vercel #4047
routeRules: {
'/cookies': { isr: 3600 },
}.
The issue is a also tested it on a new nuxt project. And it does work. The single page where i enabled isr https://www.hetvitaliteitsplatform.nl/cookies. you can observe the error. modules i use modules: [
"@nuxtjs/seo",
"@nuxt/eslint",
"@nuxt/image",
"@nuxt/ui",
// Content module automatically integrates with sitemap
"@nuxt/content",
"@nuxtjs/supabase",
"nuxt-security",
"@nuxt/hints",
"nuxt-lettermint",
"@nuxt/scripts",
"nuxt-ai-ready",
"@nuxt/a11y",
],
Describe the bug
Deploy to Vercel. Navigate to /cookies (both direct navigation and client-side navigation).
Describe the bug
When navigating to an ISR-cached route, Nuxt attempts to fetch /_payload.json-isr for the page (e.g. /cookies/_payload.json-isr). This request returns a 404:
The _payload.json-isr file should be served correctly, or Nuxt should handle the 404 gracefully without logging an error.
Actual behavior
The page loads correctly (ISR cache hit confirmed via x-vercel-cache: HIT), but a 404 network error for _payload.json-isr is logged in the browser console on every navigation to the ISR route. No visible impact to the user, but the error is noisy and may mask real issues.
Hi! I’d like to work on this issue. Could you please assign it to me? I’ll make sure to follow the contribution guidelines. Thanks!
Hi i came to the conclusion that nuxt security and nuxt content cause this issue. See Baroshem/nuxt-security#678 So not sure if this is an nitro issue or something else. I made an repo in there.
1. The error body here is the signature of a failed URL restoration in the payload ISR function. The JSON's url field is the path as the server saw it after Vercel's rewrite — it does not necessarily mean the browser requested /cookies/_payload.json-isr. When the payload function is invoked without a recoverable carrier, it renders exactly this body. Deterministic local repro (no deployment; nitropack 2.13.4):
$ NITRO_PRESET=vercel bun run build && node scripts/local-repro.mjs
...
as-expected status=404 BUG: payload fn, bare invocation
→ server rendered "Page not found: /schedule/_payload.json-isr"
The missing fallback chain in the restoration is tracked in #4446 — this issue is its _payload.json variant. Relevant here: on Vercel a 404 is a storable ISR outcome, so a payload 404 born this way can be cached and then replayed with x-vercel-cache: HIT on every navigation.
2. A diagnostic to split the two possible causes (for anyone hitting this, including the nuxt-security/@nuxt/content interplay mentioned above): check the request URL in the browser's network tab, not the error body.
Browser literally requested /cookies/_payload.json-isr → something client-side constructed the internal URL (module interplay, not Nitro's runtime). External requests to the internal -isr path always produce this same 404 body on their own cache key, so the bodies are indistinguishable — only the requested URL differs.
3. Related generation gap: catch-all ISR rules get no payload rewrite at all. For '/catchall/**': { isr: 60 } the build emits catchall/[...]-isr.func but no catchall/[...]/_payload.json-isr function or route — client-nav payload requests for those pages fall into the page's ISR rewrite instead ((?<__isr_route>/catchall/(?:.*)) matches /catchall/foo/_payload.json). Verified in .vercel/output on 2.13.4; the repo's scripts/inspect-build.mjs shows it.
One negative result that may save someone a rabbit hole: with a well-formed carrier the payload restoration works — I verified /schedule/_payload.json-isr + x-now-route-matches: __isr_route=%2Fschedule%2F_payload.json restores and returns 200 both with and without a '/**' wildcard rule. So the failure needs a malformed/absent carrier (or a direct external request), not merely an isr route rule.
AI maintenance: recommending this for closing. The Nitro-side cause is the ISR URL restoration gap tracked in #4446 (partly fixed in #4599). Leaving it open for a maintainer to decide.
Activity
Mishra-coder commentedon Mar 23, 2026
Hi! I’d like to work on this issue. Could you please assign it to me? I’ll make sure to follow the contribution guidelines. Thanks!
jlemonz commentedon Mar 23, 2026
Hi i came to the conclusion that nuxt security and nuxt content cause this issue. See Baroshem/nuxt-security#678 So not sure if this is an nitro issue or something else. I made an repo in there.
MichaelDickBasecom commentedon Jul 18, 2026
I've been dissecting the
-isr/ cached-404 symptom family on the Vercel preset (repro repo: https://github.com/MichaelDickBasecom/nuxt-vercel-isr-404-repro) and can add three verified data points to this issue.1. The error body here is the signature of a failed URL restoration in the payload ISR function. The JSON's
urlfield is the path as the server saw it after Vercel's rewrite — it does not necessarily mean the browser requested/cookies/_payload.json-isr. When the payload function is invoked without a recoverable carrier, it renders exactly this body. Deterministic local repro (no deployment; nitropack 2.13.4):The missing fallback chain in the restoration is tracked in #4446 — this issue is its
_payload.jsonvariant. Relevant here: on Vercel a 404 is a storable ISR outcome, so a payload 404 born this way can be cached and then replayed withx-vercel-cache: HITon every navigation.2. A diagnostic to split the two possible causes (for anyone hitting this, including the nuxt-security/@nuxt/content interplay mentioned above): check the request URL in the browser's network tab, not the error body.
/cookies/_payload.json?<buildId>and received a body naming/cookies/_payload.json-isr→ the platform rewrite happened and Nitro's URL restoration failed → Vercel preset: ISR URL restoration has no fallback — a failed restoration renders a cacheable 404 for the internal-isrpath #4446 family (Nitro bug)./cookies/_payload.json-isr→ something client-side constructed the internal URL (module interplay, not Nitro's runtime). External requests to the internal-isrpath always produce this same 404 body on their own cache key, so the bodies are indistinguishable — only the requested URL differs.3. Related generation gap: catch-all ISR rules get no payload rewrite at all. For
'/catchall/**': { isr: 60 }the build emitscatchall/[...]-isr.funcbut nocatchall/[...]/_payload.json-isrfunction or route — client-nav payload requests for those pages fall into the page's ISR rewrite instead ((?<__isr_route>/catchall/(?:.*))matches/catchall/foo/_payload.json). Verified in.vercel/outputon 2.13.4; the repo'sscripts/inspect-build.mjsshows it.One negative result that may save someone a rabbit hole: with a well-formed carrier the payload restoration works — I verified
/schedule/_payload.json-isr+x-now-route-matches: __isr_route=%2Fschedule%2F_payload.jsonrestores and returns 200 both with and without a'/**'wildcard rule. So the failure needs a malformed/absent carrier (or a direct external request), not merely anisrroute rule.pi0x commentedon Oct 15, 2026
AI maintenance: recommending this for closing. The Nitro-side cause is the ISR URL restoration gap tracked in #4446 (partly fixed in #4599). Leaving it open for a maintainer to decide.
Triaged with AI assistance.
-isrpath #4446