Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Huge opened this issue Oct 21, 2020 · 5 comments
Open

Comments

@Huge
Copy link

Huge commented Oct 21, 2020

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.

@oed
Copy link
Member

oed commented Oct 22, 2020

Interesting. Any idea how to sovle this @Huge? Unfortunately I've been unable to properly maintain this library. But definitely want to pick it up in the future!

@Huge
Copy link
Author

Huge commented Oct 23, 2020

idea how to sovle this @Huge?

I have almost no idea why Daan Sprenkels' ( @dsprenkels ) demo/service at https://bakaoh.com/sss-wasm/ works, what could be the differentiating factor from running it locally with no backend.

Anyway it would be useful to at least have a Readme in https://github.com/3box/sss-wasm/tree/master/example how to get it running some way, even with some Node backend or whatever needed.

@dsprenkels
Copy link

@Huge I personally do not maintain the sss-wasm demo. I do not remember who does.

@OoKurumi
Copy link

@Huge I find that you need to search and replace '.wasm' in wrapper.js, with the wasm file base64 string .Then it is not necessary to fetch the wasm file.

@dsprenkels
Copy link

I personally do not maintain that demo. That was contributed by bakaoh in #2. The new demo was more reliable than the server-side demo that I used to host.

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

No branches or pull requests

4 participants