Problem
When the uber JAR is built without the WASM report template (the dev default, trailblaze.wasm=false), report//devices rendering fails with:
WASM bundle not found. Rebuild with `-Ptrailblaze.wasm=true` (or `BUNDLE_WASM=true ./scripts/install-trailblaze-source.sh`) so the report template is bundled into the uber JAR.
Both remediations in that message are wrong / incomplete, so following them doesn't fix it:
-
BUNDLE_WASM=true ./scripts/install-trailblaze-source.sh does nothing. The script doesn't read BUNDLE_WASM — it only honors TRAILBLAZE_GRADLE_EXTRA_ARGS (its own comment notes CI uses that to pass -Ptrailblaze.wasm=true). So BUNDLE_WASM=true ... builds without WASM and the error persists.
-
The WASM build then fails on a stale yarn lock, whose own remediation is also a dead end without context:
:kotlinWasmStoreYarnLock FAILED
> Lock file was changed. Run the `kotlinWasmUpgradeYarnLock` task to actualize lock file
But kotlinWasmUpgradeYarnLock only registers when -Ptrailblaze.wasm=true is set (the wasmJs target is conditional on the flag). Run bare, it's Task 'kotlinWasmUpgradeYarnLock' not found.
What actually works (verified end-to-end)
# 1. actualize the wasm yarn lock (task only exists with the flag)
./gradlew -Ptrailblaze.wasm=true kotlinWasmUpgradeYarnLock
# 2. build + install the uber JAR WITH the wasm flag
TRAILBLAZE_GRADLE_EXTRA_ARGS="-Ptrailblaze.wasm=true" ./scripts/install-trailblaze-source.sh
After that, /devices serves the real viewer instead of the error.
Suggested better message
WASM report template not bundled in this uber JAR (dev builds default to trailblaze.wasm=false for speed). To include it, rebuild with the WASM flag:
TRAILBLAZE_GRADLE_EXTRA_ARGS="-Ptrailblaze.wasm=true" ./scripts/install-trailblaze-source.sh
If the build fails on a stale yarn lock, first run:
./gradlew -Ptrailblaze.wasm=true kotlinWasmUpgradeYarnLock
i.e. drop the non-functional BUNDLE_WASM suggestion, and note the yarn-lock upgrade task needs the flag.
Environment
Trailblaze source build off main, macOS. Surfaced while bundling the report template into a source uber JAR.
Problem
When the uber JAR is built without the WASM report template (the dev default,
trailblaze.wasm=false), report//devicesrendering fails with:Both remediations in that message are wrong / incomplete, so following them doesn't fix it:
BUNDLE_WASM=true ./scripts/install-trailblaze-source.shdoes nothing. The script doesn't readBUNDLE_WASM— it only honorsTRAILBLAZE_GRADLE_EXTRA_ARGS(its own comment notes CI uses that to pass-Ptrailblaze.wasm=true). SoBUNDLE_WASM=true ...builds without WASM and the error persists.The WASM build then fails on a stale yarn lock, whose own remediation is also a dead end without context:
But
kotlinWasmUpgradeYarnLockonly registers when-Ptrailblaze.wasm=trueis set (thewasmJstarget is conditional on the flag). Run bare, it'sTask 'kotlinWasmUpgradeYarnLock' not found.What actually works (verified end-to-end)
After that,
/devicesserves the real viewer instead of the error.Suggested better message
i.e. drop the non-functional
BUNDLE_WASMsuggestion, and note the yarn-lock upgrade task needs the flag.Environment
Trailblaze source build off
main, macOS. Surfaced while bundling the report template into a source uber JAR.