Skip to content

Pin MediaPipe WASM runtime version#32

Open
M-Elmahdi wants to merge 6 commits into
writingdeveloper:mainfrom
M-Elmahdi:codex/pin-mediapipe-wasm-runtime
Open

Pin MediaPipe WASM runtime version#32
M-Elmahdi wants to merge 6 commits into
writingdeveloper:mainfrom
M-Elmahdi:codex/pin-mediapipe-wasm-runtime

Conversation

@M-Elmahdi

Copy link
Copy Markdown

Before

The app loaded MediaPipe's WASM runtime from:

https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm

That meant an already-installed build could change behavior later, because @latest is resolved by the CDN at runtime, not when the app is built.

The installed v1.3.3 app was built with @mediapipe/tasks-vision@0.10.32, but the runtime URL now resolves through @latest. The JS/WASM pair is version-coupled, and the current @latest runtime loader request fails:

@latest/wasm/vision_wasm_internal.js -> HTTP 400
@0.10.32/wasm/vision_wasm_internal.js -> HTTP 200

That is why the same app build worked before and later started failing with:

Initializing MediaPipe... Unknown error loading model

After

The app now loads the WASM runtime from the same MediaPipe version resolved in package-lock.json:

https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.32/wasm

A unit test verifies the CDN runtime URL stays aligned with the locked package version and does not use @latest.

Validation

  • test/unit/mediapipe-urls.test.ts passes.
  • Full unit suite passes: 75 tests.
  • Built and launched the patched app locally.
  • Confirmed it reaches STANDBY.
  • Confirmed Start Detection enters MONITORING.
  • No MediaPipe model-loading error appears.

@M-Elmahdi M-Elmahdi marked this pull request as ready for review July 7, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant