Skip to content

Engine build fails: the downloaded web UI no longer passes the asset check (no workbox file) #4

Open

Description

@shadowcodex

What happens

A build of the engine with the default options fails at the llama-ui-assets step, on main and at engine-v0.2.0:

-- UI: downloading from b27: https://huggingface.co/buckets/ggml-org/llama-ui/resolve/b27/dist.tar.gz
-- UI: download dist.tar.gz.sha256 from b27 failed: "HTTP response code said error"
-- UI: downloading from latest: https://huggingface.co/buckets/ggml-org/llama-ui/resolve/latest/dist.tar.gz
-- UI: archive verified and extracted
CMake Error at engine/scripts/ui-assets.cmake:137 (message):
  UI: current asset files:
      ...
      service-worker.js
      sw.js

  UI: missing required asset(s):

      workbox[hash].js

ninja then stops with subcommand failed, so llama-server is not built. Nothing in the engine's own code is at fault.

Why

  1. The build downloads the web UI. LLAMA_USE_PREBUILT_UI is ON by default (engine/CMakeLists.txt), so the build fetches the server's prebuilt chat page from the upstream llama.cpp bucket ggml-org/llama-ui. -DLLAMA_BUILD_UI=OFF does not stop this: it only turns off the npm build.
  2. The version it asks for never exists. The version is b<build number>, and the build number is the checkout's commit count (engine/cmake/build-info.cmake). This repository has 27 commits, so the build asks for b27, which is not an upstream build. A source tree without git asks for no version at all. Both fall back to latest.
  3. Upstream's latest changed. Its archive now has service-worker.js and no workbox-*.js. ui_validate_assets in engine/scripts/ui-assets.cmake still requires a workbox*.js file and fails the build. Upstream's current copy of that script accepts either file.

The change landed between 11:30 and 12:15 UTC on 2026-11-17: an automated build that runs this step many times a day passed until then and has failed on every run since.

What it affects

  • containers/engine.sm60.Containerfile. It copies engine/ without git and passes -DLLAMA_BUILD_UI=OFF but not -DLLAMA_USE_PREBUILT_UI=OFF, so the engine image can no longer be built.
  • Any build from source with the default options, from a git checkout or from an archive.
  • Not affected: a build with -DLLAMA_USE_PREBUILT_UI=OFF, and one with prebuilt files in engine/tools/ui/dist.

Two more things follow from the same cause:

  • The engine image is not reproducible. By the script's logic, an image built before the upstream change embeds whatever latest was on the day it was built, and its build needs the network.
  • The docs say otherwise. site/src/content/docs/docs/reference/engine-image.md lists LLAMA_BUILD_UI=OFF as "no web UI". With the download on, the image gets a web UI.

How to reproduce

From the repository root, with CMake and network access (no compiler needed):

cmake -DUI_SOURCE_DIR=$PWD/engine/tools/ui -DUI_BINARY_DIR=/tmp/ui-out \
  -DLLAMA_SOURCE_DIR=$PWD/engine -DHF_BUCKET=ggml-org/llama-ui -DHF_VERSION= \
  -DHF_ENABLED=ON -DBUILD_UI=OFF -DLLAMA_UI_GZIP=ON -P engine/scripts/ui-assets.cmake

It exits 1 with the error above (checked on main at 3878d7a, 2026-11-18 04:35 UTC). With -DHF_ENABLED=OFF in a new output directory it prints UI: embedded 0 assets and exits 0.

What to decide and fix

  • The engine image: add -DLLAMA_USE_PREBUILT_UI=OFF to the Containerfile if the image is meant to have no web UI, as the docs say. This is the smallest change, and the build then fetches nothing for the UI.
  • The asset check: take upstream's change to ui_validate_assets (accept service-worker.js or workbox*.js), so that a default build passes again.
  • The version: stop a released tag from depending on latest. Options: pin HF_UI_VERSION to the upstream build the engine is based on, never fall back to latest, or make LLAMA_USE_PREBUILT_UI default to OFF.
  • The docs: correct the LLAMA_BUILD_UI line of the engine image page to match what is chosen.

Done when

  • containers/engine.sm60.Containerfile builds from a clean context.
  • A default-option build from a git checkout and from a source archive gets past llama-ui-assets.
  • A later change to upstream's latest cannot break a build of a released tag.
  • The engine image page says what the image holds.

Activity

  1. added
    bug
    on Nov 18, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions