You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
panicked at 'could not initialize thread_rng: Node.js crypto module is unavailable', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.5/src/rngs/thread.rs:72:17
Stack:
Error
at __wbg_new_693216e109162396 (webpack-internal:///./node_modules/ergo-lib-wasm-browser/ergo_lib_wasm_bg.js:6914:17)
at console_error_panic_hook::hook::h992992de3f0fa9b9 (wasm://wasm/00ffe776:wasm-function[1812]:0x198005)
at core::ops::function::Fn::call::hc810e5369804b9f1 (wasm://wasm/00ffe776:wasm-function[10901]:0x29a677)
at std::panicking::rust_panic_with_hook::h1c368a27f9b0afe1 (wasm://wasm/00ffe776:wasm-function[2967]:0x1e955f)
at std::panicking::begin_panic_handler::{{closure}}::h8e1f8b682ca33009 (wasm://wasm/00ffe776:wasm-function[4676]:0x236ce4)
at std::sys_common::backtrace::__rust_end_short_backtrace::h7f7da41799766719 (wasm://wasm/00ffe776:wasm-function[9950]:0x2973b2)
at rust_begin_unwind (wasm://wasm/00ffe776:wasm-function[7859]:0x281b8c)
at core::panicking::panic_fmt::hcdb13a4b2416cf82 (wasm://wasm/00ffe776:wasm-function[7922]:0x2829f3)
at std::thread::local::lazy::LazyKeyInner<T>::initialize::hc4dfa70367192fbc (wasm://wasm/00ffe776:wasm-function[1709]:0x18ea94)
at rand::rngs::thread::THREAD_RNG_KEY::__getit::h8a182064bee393d6 (wasm://wasm/00ffe776:wasm-function[9567]:0x295009)
Fix:
Looks like this rust-random/getrandom#256 (comment) works 🥳
still running some tests but that seems to be the solution for us. Using browser wasm version and adding the at the end of the bindings file
Even better fix:
Figure out why cardano-serialization-lib JS bindings work and use the same approach.
The text was updated successfully, but these errors were encountered:
Attempted to fix in #620
trace:
Fix:
Even better fix:
Figure out why
cardano-serialization-lib
JS bindings work and use the same approach.The text was updated successfully, but these errors were encountered: