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

Error: instantiation failed: unknown import, Code: 0x62 #47

Closed
tpmccallum opened this issue Apr 26, 2022 · 2 comments
Closed

Error: instantiation failed: unknown import, Code: 0x62 #47

tpmccallum opened this issue Apr 26, 2022 · 2 comments

Comments

@tpmccallum
Copy link

I have cloned this React blog software [1] which is also part of a comprehensive YouTube tutorial about React [2].
After building it using the standard npm commands (to make sure it worked) I then went ahead and update the source code and config to be rendered server side. I used the SSR [3] instructions from the WasmEdge book.

Everything was successful right up until the final command to start the server i.e. wasmedge --dir .:. wasmedge_quickjs.wasm ./server-build/index.js

Here is the error which was returned from that command.

[2022-04-26 10:31:26.387] [error] instantiation failed: unknown import, Code: 0x62
[2022-04-26 10:31:26.387] [error]     When linking module: "wasi_snapshot_preview1" , function name: "sock_setsockopt"
[2022-04-26 10:31:26.387] [error]     At AST node: import description
[2022-04-26 10:31:26.387] [error]     When linking module: "wasi_snapshot_preview1" , function name: "sock_setsockopt"
[2022-04-26 10:31:26.387] [error]     At AST node: import description
[2022-04-26 10:31:26.387] [error]     At AST node: import section
[2022-04-26 10:31:26.387] [error]     At AST node: module

[1] https://github.com/iamshaunjp/Complete-React-Tutorial/tree/lesson-32/dojo-blog
[2] https://www.youtube.com/watch?v=j942wKiXFu8&list=PL4cUxeGkcC9gZD-Tvwfod2gaISzfRiP9d&index=1
[3] https://wasmedge.org/book/en/dev/js/ssr.html

@L-jasmine
Copy link
Collaborator

maybe you need try linux. sock_setsockopt is unimplemented on mac & windows.

@tpmccallum
Copy link
Author

Thanks @L-jasmine
Yes, the server is actually running on Ubuntu Linux.
@hydai asked about the version of WasmEdge; I checked the version on the server and it turns out it was running WasmEdge 0.9.0
I reinstalled using the one-line installer which upgraded WasmEdge to 0.9.1 and the error was resolved, which is great.
Thanks again
Tim

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

2 participants