Replies: 2 comments 1 reply
-
|
Forgot to mention, I'm using |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Updating Rust solved the issue @fzyzcjy Should we put the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description of the bug
On load in the web browser it raises the following Javascript exception:
My machine:
The code is generated with wasm-pack called through flutter_rust_bridge_codegen with the build-web call.
The Rust and Dart source code is irrelevant, as it's giving me the same error even with the provided example.
What I found so far
__wbg_init (in pkg/my_project.js) is called with a
{module_or_path: 'pkg/my_project_bg.wasm'}Object, the wasm file exists and it is accessible.What it is expected
As far as I can tell from reading __wbg_init, it expects a simple string (or a Response or URL object), not a object.
Possible patch
I am not a Dart developer so unfortunately I can only offer guesses for a solution.
From the stack trace and source map, __wbg_init is called from _web.dart:18 (which in turns is called from async_patch.dart:623).
From
frb_dart/lib/src/wasm_module/_web.dart:should probably be:
Beta Was this translation helpful? Give feedback.
All reactions