[GH-ISSUE #402] [Issue]: Workbox non-precached-url error for index.html in sw.js #167

Closed
opened 2026-10-20 17:25:50 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @cha1latte on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/402

Summary

The service worker logs a non-precached-url Workbox error for index.html on every page load. sw.js calls createHandlerBoundToURL("index.html"), but index.html is excluded from the precache manifest by the Vite config's globPatterns.

Expected behavior

No Workbox errors in the console on page load. The navigation handler should bind to a URL that is actually present in the precache, or use a runtime strategy that doesn't require precaching.

Actual behavior

Browser console shows:

non-precached-url :: [{"url":"index.html"}]

from sw.js on page load.

The handler in sw.js calls createHandlerBoundToURL("index.html"), but globPatterns in packages/client/vite.config.ts is ["**/*.{js,css,png,svg,ico,woff2}"] — html is excluded, so the handler has nothing to bind to. Console noise only; no functional impact has been observed.

Steps to reproduce

  1. Install v1.5.7 fresh.
  2. Open http://localhost:7860 in a Chromium-based browser.
  3. Open DevTools → Console.

Environment

  • Marinara Engine version: v1.5.7 (build 8325c75)
  • Install type: source (Windows installer/start.bat flow)
  • OS + version: Windows 11
  • Browser or app shell: Chromium-based browser

Platform-independent — the bug is in the built service worker / Vite config.

Logs, screenshots, or video

non-precached-url :: [{"url":"index.html"}]

(emitted from sw.js)

Additional context

Fix options:

  • Add html to globPatterns in packages/client/vite.config.ts so index.html is included in the precache, or
  • Replace the precache-bound navigation handler in sw.js with a NetworkFirst (or StaleWhileRevalidate) route for navigations, which doesn't require the URL to be precached.

Surfaced while diagnosing #401 (the v1.5.7 privileged-gate 403). Filed separately because the two are unrelated.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (May 4, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/402 ## Summary The service worker logs a `non-precached-url` Workbox error for `index.html` on every page load. `sw.js` calls `createHandlerBoundToURL("index.html")`, but `index.html` is excluded from the precache manifest by the Vite config's `globPatterns`. ## Expected behavior No Workbox errors in the console on page load. The navigation handler should bind to a URL that is actually present in the precache, or use a runtime strategy that doesn't require precaching. ## Actual behavior Browser console shows: ``` non-precached-url :: [{"url":"index.html"}] ``` from `sw.js` on page load. The handler in `sw.js` calls `createHandlerBoundToURL("index.html")`, but `globPatterns` in `packages/client/vite.config.ts` is `["**/*.{js,css,png,svg,ico,woff2}"]` — html is excluded, so the handler has nothing to bind to. Console noise only; no functional impact has been observed. ## Steps to reproduce 1. Install v1.5.7 fresh. 2. Open `http://localhost:7860` in a Chromium-based browser. 3. Open DevTools → Console. ## Environment - Marinara Engine version: v1.5.7 (build 8325c75) - Install type: source (Windows installer/start.bat flow) - OS + version: Windows 11 - Browser or app shell: Chromium-based browser Platform-independent — the bug is in the built service worker / Vite config. ## Logs, screenshots, or video ``` non-precached-url :: [{"url":"index.html"}] ``` (emitted from `sw.js`) ## Additional context **Fix options:** - Add `html` to `globPatterns` in `packages/client/vite.config.ts` so `index.html` is included in the precache, **or** - Replace the precache-bound navigation handler in `sw.js` with a `NetworkFirst` (or `StaleWhileRevalidate`) route for navigations, which doesn't require the URL to be precached. Surfaced while diagnosing #401 (the v1.5.7 privileged-gate 403). Filed separately because the two are unrelated. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:25:50 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (May 4, 2026):

Addressed in a fix.

<!-- gh-comment-id:4372562157 --> @SpicyMarinara commented on GitHub (May 4, 2026): Addressed in a fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#167
No description provided.