You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the first call, all subsequent calls fail with the following error in the browser console : Assertion failed: you need to wait for the runtime to be ready (e.g. wait for main() to be called)
There's certainly something wrong in the way I implemented that, but the runtime was ready for the first working call.
check that runtime initialized appears in the console (it's triggered by Module['onRuntimeInitialized'])
click on "Read article count (with kiwix-lib)" button
the article count is read in the ZIM file through the wasm version of libzim
click again on the same button : it fails with the mentioned error in the console
The bindings are currently implemented with embind, in file demo_file_api.cpp. This test case only uses the getArticleCount function (same name in C and javascript).
If one wants to modify and recompile the C code, it can be done with make (see the provided Makefile, you'll need emscripten and a few libraries) or ran inside a docker container (that already contains everything). See https://github.com/mossroy/libzim_wasm/blob/master/README.md for how to do it.
The text was updated successfully, but these errors were encountered:
This seems to be improved with version 2.0.32 of emscripten.
It now works to call several times the libzim APIs, which is cool.
But there is each time an error message in the browser console :
Uncaught RuntimeError: Aborted(Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name))
So there is probably something to fix in our code anyway
This is a follow-up of #116.
After the first call, all subsequent calls fail with the following error in the browser console :
Assertion failed: you need to wait for the runtime to be ready (e.g. wait for main() to be called)
There's certainly something wrong in the way I implemented that, but the runtime was ready for the first working call.
Here is how to reproduce :
runtime initialized
appears in the console (it's triggered byModule['onRuntimeInitialized']
)The bindings are currently implemented with embind, in file demo_file_api.cpp. This test case only uses the getArticleCount function (same name in C and javascript).
If one wants to modify and recompile the C code, it can be done with
make
(see the provided Makefile, you'll need emscripten and a few libraries) or ran inside a docker container (that already contains everything). See https://github.com/mossroy/libzim_wasm/blob/master/README.md for how to do it.The text was updated successfully, but these errors were encountered: