wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

`wasm-pack build` panics on `Installing wasm-bindgen...` step

Open Niedzwiedzw opened this issue 2 years ago • 2 comments

Finished release [optimized] target(s) in 0.08s [INFO]: License key is set in Cargo.toml but no LICENSE file(s) were found; Please add the LICENSE file(s) to your project directory [INFO]: Installing wasm-bindgen... thread 'main' panicked at 'unknown instruction Block(Block { seq: Id { idx: 1 } })', crates/wasm-interpreter/src/lib.rs:367:18 stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: wasm_bindgen_wasm_interpreter::Interpreter::call 3: wasm_bindgen_wasm_interpreter::Interpreter::interpret_descriptor 4: wasm_bindgen_cli_support::descriptors::execute 5: wasm_bindgen_cli_support::Bindgen::generate_output 6: wasm_bindgen_cli_support::Bindgen::generate 7: wasm_bindgen::main note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. Error: Running the wasm-bindgen CLI Caused by: failed to execute wasm-bindgen: exited with exit status: 101 full command: "/home/niedzwiedz/.cache/.wasm-pack/wasm-bindgen-5f26acfc988649a3/wasm-bindgen" "/home/niedzwiedz/crionis/crio-app/target/wasm32-unknown-unknown/release/editor.wasm" "--out-dir" "/home/niedzwiedz/crionis/crio-app/pkg" "--typescript" "--target" "bundler" "--out-name" "index"

EDIT: https://github.com/rustwasm/wasm-bindgen/blob/629a623adfe27c67a21408c120d3466965575e45/crates/wasm-interpreter/src/lib.rs#L367 this is the line that crashes

Niedzwiedzw avatar Feb 16 '23 15:02 Niedzwiedzw

I also got panic with wasm-pack new hello-wasm

    Finished dev [unoptimized + debuginfo] target(s) in 55.38s
     Running `target/debug/wasm-pack new hello-wasm`
[INFO]: ⬇️  Installing cargo-generate...
fish: Job 1, 'cargo run -- new hello-wasm' terminated by signal SIGSEGV (Address boundary error)

I guess my case is more related to this https://github.com/rustwasm/wasm-pack/issues/1245

hucancode avatar Apr 01 '23 07:04 hucancode

Please try out v0.12.0 from one of the following ways:

  • https://github.com/rustwasm/wasm-pack/releases/tag/v0.12.0
  • https://crates.io/crates/wasm-pack/0.12.0
  • https://www.npmjs.com/package/wasm-pack/v/0.12.0

drager avatar Jun 17 '23 13:06 drager