Browser WebAssembly Error: `WebAssembly.instantiateStreaming` Failed (Incorrect MIME Type)

Web server served `.wasm` with `application/octet-stream` instead of `application/wasm`.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Browser WebAssembly Error Platform: Web
Common Root Causes:
  • Web server served `.wasm` with `application/octet-stream` instead of `application/wasm`.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Map `application/wasm wasm;` explicitly in Nginx `types {}` configuration.
Safe Diagnostic Command:
curl -sI https://<domain>/app.wasm | grep -i content-type
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Web server served `.wasm` with `application/octet-stream` instead of `application/wasm`. Recommended diagnostic: `curl -sI https://<domain>/app.wasm | grep -i content-type`. Remediation: Map `application/wasm wasm;` explicitly in Nginx `types {}` configuration.

Worked Examples

  • Run `curl -sI https://<domain>/app.wasm | grep -i content-type` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-wasm-instantiate-streaming-mime · Independently verified: 2026-11-25

Related Resources