3box / 3box/sss-wasm

Simple download and run the example locally does not work( on Windows 10)

Offen
#7 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
24
Forks
11
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I have clonned your repository hoping that I can run the https://github.com/3box/sss-wasm/tree/master/example offline from my system, the index opens, but the logic does not work.
Browser console shows loading errors like `Fetch API cannot load file:///C:/Users/myUser/Desktop/sss-wasm-master/example/wrapper.wasm. URL scheme must be "http" or "https" for CORS request.` Further there is this trace:

```
sss-wasm.js:13463 wasm streaming compile failed: TypeError: Failed to fetch
anonymous) | @ | sss-wasm.js:13463
| Promise.catch (async) |   |  
  | doNativeWasm | @ | sss-wasm.js:13462
  | Module.asm | @ | sss-wasm.js:13501
  | Wrapper | @ | sss-wasm.js:13523
  | (anonymous) | @ | sss-wasm.js:13048
  | load | @ | sss-wasm.js:13047
  | createShares | @ | sss-wasm.js:13073
  | do_split | @ | index.html:62
```
There is a few more and the last is `Uncaught (in promise) abort("abort(\"on the web, we need the wasm binary to be preloaded and set on Module['wasmBinary']. emcc.py will do that for you when generating HTML (but not JS)\"). Build with -s ASSERTIONS=1 for more info."). Build with -s ASSERTIONS=1 for more info.`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

The issue is about running the example locally on Windows 10, which fails due to CORS and WASM loading errors. Look at the example directory, specifically index.html and sss-wasm.js, to understand how the WASM binary is loaded. The error suggests the need to preload the binary; check the build process (emcc.py) and see if the example expects an HTTP server. Running a local server might be required, and modifications to the loading logic could be needed.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, wasm
Bereich
tooling, web-dev
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.