Closed SuperIceCN closed 3 years ago
I guess the error is related to filesystem permission? I could imagine two possible causes:
"./"
is not valid on windows platform. As I previously wrote here, java automatically converts unix-style path to platform specific path when dealing with filesystems, but it is not the case for the PreopenDir.hostPath
because, 1. it is a type of String and 2. the actual processing of the path (filesystem open) happens at Rust code, so we don't expect implicit path conversion performed here. FYI, here's some example code and blog entry that I've done previously and know it works (on unix platform):
Thanks a lot! Let me see.
Solved, close.
I tried to pass a preopendir to wasi, but whatever the paths are, I get the same error:
java.lang.RuntimeException: java.lang.RuntimeException: IO error: 拒绝访问。 (os error 5) Caused by: java.lang.RuntimeException: IO error: 拒绝访问。 (os error 5) at io.github.kawamuray.wasmtime.wasi.Wasi.newWasi(Native Method) ~[WebassemblyBN.jar:?] at io.github.kawamuray.wasmtime.wasi.Wasi.(Wasi.java:18) ~[WebassemblyBN.jar:?]
at com.blocklynukkit.loader.scriptloader.scriptengines.WasmScriptEngine.buildWasi(WasmScriptEngine.java:84) ~[BlocklyNukkit.jar:1.7.25]
at com.blocklynukkit.loader.scriptloader.scriptengines.WasmScriptEngine.(WasmScriptEngine.java:62) ~[BlocklyNukkit.jar:1.7.25]
at com.blocklynukkit.loader.scriptloader.WasmLoader.putWasmEngine(WasmLoader.java:85) ~[BlocklyNukkit.jar:1.7.25]
at com.blocklynukkit.loader.scriptloader.WasmLoader.loadplugins(WasmLoader.java:34) ~[BlocklyNukkit.jar:1.7.25]
at com.blocklynukkit.loader.Loader.onEnable(Loader.java:250) ~[BlocklyNukkit.jar:1.7.25]
... 4 more
What should I do? Is it only happens on Windows? Any help would be appreciated!