Skip to content

_payload.json-isr 404 on ISR routes deployed to Vercel #4047

Closed as duplicate
Closed as duplicate

Description

@jlemonz

Environment

Nuxt: 4.3.1
Nitro: 2.13.1
Deployment target: Vercel
Node.js: 22.x

Reproduction

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:

json
{
"error": true,
"url": "https://example.com/cookies/_payload.json-isr",
"statusCode": 404,
"statusMessage": "Page not found: /cookies/_payload.json-isr",
"message": "Page not found: /cookies/_payload.json-isr",
"data": { "path": "/cookies/_payload.json-isr" }
}
Expected behavior

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.

Additional context

No response

Logs

Activity

  1. added
    pending triage
    on Feb 20, 2026
  2. Mishra-coder commented on Mar 23, 2026

    @Mishra-coder

    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!

  3. jlemonz commented on Mar 23, 2026

    @jlemonz
    Author

    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.

  4. MichaelDickBasecom commented on Jul 18, 2026

    @MichaelDickBasecom

    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 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.

    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.

  5. added
    bug
    nuxt
    and removed
    pending triage
    on Sep 2, 2026
  6. pi0x commented on Oct 15, 2026

    @pi0x
    Contributor

    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.

  7. added theissue type on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnuxt

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions