Skip to content

Blank page: origin serves the SPA fallback (200 text/html) for /assets/*.js on CDN cache MISS #45

Description

@Finalstepbitcoin

The deploy app at https://nsite.run renders a blank #0f172a page. <div id="app"> stays empty and the console reports:

Failed to load module script: Expected a JavaScript-or-Wasm module script
but the server responded with a MIME type of "text/html".
Strict MIME type checking is enforced for module scripts per HTML spec.

Root cause

The origin behind Bunny pull zone 5480021 answers inconsistently for /assets/index-DsjGPN31.js. Same URL, same region (cdn-requestcountrycode: IT), two different results within four minutes:

client cdn-edgestorageid cdn-cache response
curl 1202 HIT application/javascript — 575876 bytes ✅
browser 888 MISS (cdn-requestpullcode: 200) text/html — 462 bytes ❌

The 462-byte body is the index.html shell itself. So whether the app loads depends on which edge you land on and whether that edge already has the object cached. Users routed to an edge that has to pull from origin get a permanently blank page.

Contributing factor

Missing assets return 200 text/html instead of 404. For example:

$ curl -s -o /dev/null -w '%{http_code} %{content_type}\n' \
    https://nsite.run/assets/questo-non-esiste-12345.js
200 text/html

The SPA history fallback should not apply under /assets/. A real 404 there would fail loudly at deploy time instead of silently breaking module loading for a subset of users.

Reproduction

  • 21 August 2026, two independent browsers on two different machines.
  • Not a browser cache issue: fetch('/assets/index-DsjGPN31.js', {cache: 'reload'}) from the page itself still returns content-type: text/html, 462 bytes.
  • Not an extension, VPN or ad-blocker issue: reproduced in a clean browser profile with no extensions.
  • Persisted for more than 24 hours; the bundle hash referenced by index.html is unchanged over that period.

Suggested fixes

  1. Purge the pull zone and verify the origin actually holds every asset hash referenced by the deployed index.html — the symptom looks like a partially propagated deploy.
  2. Exclude /assets/ from the SPA fallback rule so that a missing chunk returns 404 rather than 200 text/html.

Thanks for the project — happy to provide any further diagnostics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions