microsoft / microsoft/onnxruntime-inference-examples

no available backend found. ERR: [wasm] TypeError: _ is not a function [cpu] Error: previous call to 'initializeWebAssembly()'

Open
#358 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.7k
Forks
414
Avg merge
1d 6h
Merged PRs (30d)
14

Description

i use ort.wasm.min.js
when i set ort.env.wasm.proxy = false;
There is no problem with the generation environment, but there is an issue with the publishing environment;
error is :
ort.wasm.min.js:1 Uncaught (in promise) Error: no available backend found. ERR: [wasm] TypeError: _ is not a function, [cpu] Error: previous call to 'initializeWebAssembly()' failed., [xnnpack] Error: previous call to 'initializeWebAssembly()' failed.

when i set: ort.env.wasm.proxy = true;
for the first time, decodingSession.run(decodingFeeds), is ok;
second time error:
"DataCloneError: Failed to execute 'postMessage' on 'Worker': ArrayBuffer at index 0 is already detached."
I don't know how to set it up. It's right;

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the published environment using ort.wasm.min.js and reproduce both ort.env.wasm.proxy settings. Trace initializeWebAssembly() and decodingSession.run(decodingFeeds) across the first and second runs; done means the published build selects a backend successfully and repeated decoding runs without the detached ArrayBuffer error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.