LiquidPlayer / LiquidCore

Node.js virtual machine for Android and iOS
MIT License
1.01k stars 127 forks source link

failed to asynchronously prepare wasm: RuntimeError: abort(Error: ENOENT: no such file or directory, open 'addOne.wasm') #184

Open rifaldyaristya opened 4 years ago

rifaldyaristya commented 4 years ago

I try to use LiquidCore in my Kotlin Android App because I need to load my WASM module from JS file generated by Emscripten. However, when I require my JS file, works fine but when my JS module try to ready wasm file. It pops error says that no such file or directory.

const {LiquidCore} = require('liquidcore') let factory = require('./addOne.js');

factory().then((instance) => { console.log("Yey!!"); }); --> This code generates error

My package.JSON looks like this: "dependencies": { "liquidcore": "^0.7.10" }, "liquidcore": { "entry": [ "example.js" ], "gradle_options": { "module": "app" }, "bundler_output": { "android": "app/src/main/res/raw" } }

NOTES : the WASM file is on the same directory as the JS module that calls it.

So why the JS module can be loaded to example.js (using require) but the WASM file cannot be read by the module?

My microservice looks something like this: val uri = MicroService.Bundle(context, "example") val service = MicroService(context, uri, startListener) service.start()

Please kindly help.. Thanks!

frank-dspeed commented 4 years ago

No WASM Support at present