Skip to content

Web UI fails to load: bundled skiko loader points at a file:///home/den/... path from the build machine #340

Description

@gnllucena

Version: sndxr/komf:2.0.1 (docker, image built 2026-09-01)
Browser: Firefox 155.0.1 (aarch64)

Opening the Komf web UI shows a blank page. The console reports:

Security Error: Content at http://<host>:8085/ may not load or link to file:///.

followed by a TypeError from the Kotlin/Wasm bootstrap.

The server side is fine: the API answers (/api/config returns the loaded
config), and every UI asset is served correctly with the pre-compressed gzip
files from the jar (komelia-app.js, styles.css, komeliaImageWorker.js,
and the four .wasm files all come back 200 with the right content type).

The cause is in the bundle itself. komelia-app.js (unzipped from
komelia/komelia-app.js.gz in komf-app-1.0.0-SNAPSHOT-all.jar) contains
the emscripten script name of the skiko loader hard-coded to a path on the
build machine:

var i, o = (i = "file:///home/den/Projects/Komelia/build/wasm/packages/komelia-app/kotlin/skiko.mjs", async function(e = {}) { ...

The loader derives its script directory from that string and uses it when
resolving the wasm module (the F = e => e.startsWith("file://") branch, then
the ArrayBuffer fallback). Firefox blocks a page served over http from
touching a file:/// URL, so the module never loads and the UI never renders.

Expected: the loader resolves relative to the page it was served from
(document.baseURI / the webpack public path), as the new URL(..., _.b)
branch already does for the other wasm module.

Steps to reproduce:

  1. docker run --rm -p 8085:8085 sndxr/komf:2.0.1
  2. open http://localhost:8085 in Firefox 155 with the console open

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions