Open aran opened 2 weeks ago
Thanks for the report! It would be great to show a bit more. For example, the whole repo with all the code, including pkg/rust_lib_repro.js 673:21
and packages/flutter_rust_bridge/src/generalized_frb_rust_binding/_web.dart 26:5
.
(If you recompile and the line numbers changed, remember to update them here ;) )
Hmm I do not see the pkg/rust_lib_repro.js
, maybe (for this repro only, surely) temporarily make it non-git-ignored to have a look.
Hmm, then it does not reveal a lot. Another way to debug is that, we can modify frb_generated.rs
(e.g. pde_ffi_dispatcher_primary
in this case), and add some logging to see what is happening. For example, I personally may add fn pde_ffi_dispatcher_primary() { log::info!("hi START"); ... log::info("hi stage 1"); ... }
and if e.g. hi stage 1
is never printed, I know problem lies between START and hi-stage-1.
Describe the bug
By default in a brand new project there is an exception thrown in RustLib.init in Chrome. It is swallowed and silent but the debugger sees it. Stack trace below. Flagging in case it leads to solving some other issues.
Steps to reproduce
flutter_rust_bridge_codegen create repro
flutter_rust_bridge_codegen generate && flutter_rust_bridge_codegen build-web
["--web-header", "Access-Control-Allow-Origin=*", "--web-header", "Cross-Origin-Embedder-Policy=require-corp", "--web-header", "Cross-Origin-Opener-Policy=same-origin"]
Logs
Expected behavior
No response
Generated binding code
No response
OS
macos
Version of
flutter_rust_bridge_codegen
dev.32
Flutter info
Version of
clang++
Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.4.0
Additional context
No response