© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3w ago•
27 replies
highflyingfantasy

WASM runtime error

edge functions🟡javascript
Hi,
I've compiled my WASM package using
wasm-pack
wasm-pack
and it won't run on the server. I've created a small example package with the deno runtime and it works just fine. Seems to be an issue with the edge function deploy. FWIW, it also seems to be duplicating my
{packageName}/index.js
{packageName}/index.js
file when I deploy with docker running. I've followed the guide, and I've burned a full day trying to diagnose and triage these issues. Here's the error:

{
  "event_message": "event loop error: TypeError: NetworkError when attempting to fetch resource\n    at opFetchSend (ext:deno_fetch/26_fetch.js:92:10)\n    at mainFetch (ext:deno_fetch/26_fetch.js:191:18)\n    at ext:deno_fetch/26_fetch.js:419:11\n    at new Promise (<anonymous>)\n    at fetch (ext:deno_fetch/26_fetch.js:369:20)\n    at file:///var/tmp/sb-compile-edge-runtime/functions/<function name>/<wasm-module-name>/index.js:304:65",
  "id": "1677ba43-4a3a-4082-90dd-7fabde759f92",
  "metadata": [
    {
      "boot_time": null,
      "cpu_time_used": null,
      "deployment_id": "<removed>",
      "event_type": "UncaughtException",
      "execution_id": "eb45e80a-da7f-484a-b8d4-ccec40fd9a94",
      "function_id": "<removed>",
      "level": "error",
      "memory_used": [],
      "project_ref": "<removed>",
      "reason": null,
      "region": "us-east-1",
      "served_by": "supabase-edge-runtime-1.69.25 (compatible with Deno v2.1.4)",
      "timestamp": "2026-01-15T21:56:24.477Z",
      "version": "29"
    }
  ],
  "timestamp": 1768514184477000
}
{
  "event_message": "event loop error: TypeError: NetworkError when attempting to fetch resource\n    at opFetchSend (ext:deno_fetch/26_fetch.js:92:10)\n    at mainFetch (ext:deno_fetch/26_fetch.js:191:18)\n    at ext:deno_fetch/26_fetch.js:419:11\n    at new Promise (<anonymous>)\n    at fetch (ext:deno_fetch/26_fetch.js:369:20)\n    at file:///var/tmp/sb-compile-edge-runtime/functions/<function name>/<wasm-module-name>/index.js:304:65",
  "id": "1677ba43-4a3a-4082-90dd-7fabde759f92",
  "metadata": [
    {
      "boot_time": null,
      "cpu_time_used": null,
      "deployment_id": "<removed>",
      "event_type": "UncaughtException",
      "execution_id": "eb45e80a-da7f-484a-b8d4-ccec40fd9a94",
      "function_id": "<removed>",
      "level": "error",
      "memory_used": [],
      "project_ref": "<removed>",
      "reason": null,
      "region": "us-east-1",
      "served_by": "supabase-edge-runtime-1.69.25 (compatible with Deno v2.1.4)",
      "timestamp": "2026-01-15T21:56:24.477Z",
      "version": "29"
    }
  ],
  "timestamp": 1768514184477000
}


Which suggests that the issue is coming from these lines:

const wasmUrl = new URL('index_bg.wasm', import.meta.url);
const wasmInstantiated = await WebAssembly.instantiateStreaming(fetch(wasmUrl), __wbg_get_imports());
const wasm = wasmInstantiated.instance.exports;
wasm.__wbindgen_start();
const wasmUrl = new URL('index_bg.wasm', import.meta.url);
const wasmInstantiated = await WebAssembly.instantiateStreaming(fetch(wasmUrl), __wbg_get_imports());
const wasm = wasmInstantiated.instance.exports;
wasm.__wbindgen_start();


L304
L304
is the
wasmInstantiated
wasmInstantiated
line.

I'm using
wasm-pack 0.13.1
wasm-pack 0.13.1
.

Please let me know if there are any other details you need.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Docker build error -> edge-runtime
SupabaseSSupabase / help-and-questions
14mo ago
supabase-js v2 runtime error with SvelteKit
SupabaseSSupabase / help-and-questions
4y ago
Runtime types generation
SupabaseSSupabase / help-and-questions
6mo ago
DNS error in edge-runtime container (rootless Docker in WSL2)
SupabaseSSupabase / help-and-questions
3y ago