wasm-pack Crash Report

Created on 4 Mar 2019  路  4Comments  路  Source: rustwasm/wasm-pack

馃悰 Bug description

I'm having an issue after running wasm-pack build on a new project (following the game of life book).

PS C:\Users\Outpox\Projects\wasm-game-of-life> wasm-pack build

  [1/10] Checking `rustc` version...
  [2/10] Checking crate configuration...
  [3/10] Adding WASM target...
  info: downloading component 'rust-std' for 'wasm32-unknown-unknown'
  info: installing component 'rust-std' for 'wasm32-unknown-unknown'
  [4/10] Compiling to WASM...
     Compiling proc-macro2 v0.4.27
     Compiling unicode-xid v0.1.0
     Compiling wasm-bindgen-shared v0.2.38
     Compiling cfg-if v0.1.6
     Compiling lazy_static v1.3.0
     Compiling wasm-bindgen v0.2.38
     Compiling log v0.4.6
     Compiling quote v0.6.11
     Compiling syn v0.15.27
     Compiling wasm-bindgen-backend v0.2.38
     Compiling wasm-bindgen-macro-support v0.2.38
     Compiling wasm-bindgen-macro v0.2.38
     Compiling console_error_panic_hook v0.1.6
     Compiling wasm-game-of-life v0.1.0 (C:\Users\Outpox\Projects\wasm-game-of-life)
      Finished release [optimized] target(s) in 20.02s
  [5/10] Creating a pkg directory...
  [6/10] Writing a package.json...
   [INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
  [7/10] Copying over your README...
  [8/10] No LICENSE found in Cargo.toml, skipping...
  [9/10] Installing wasm-bindgen...
      Updating crates.io index
   Downloading crates ...
    Downloaded wasm-bindgen-cli v0.2.38
    Installing wasm-bindgen-cli v0.2.38
   Downloading crates ...
    Downloaded wasm-bindgen-cli-support v0.2.38
    Downloaded base64 v0.9.3
[...]
Compiling wasm-bindgen-cli-support v0.2.38
     Compiling rouille v3.0.0
     Compiling wasm-bindgen-cli v0.2.38
      Finished release [optimized] target(s) in 1m 40s
    Installing C:\Users\Outpox\AppData\Local\.wasm_pack\.wasm-bindgen-cargo-install-0.2.38\bin\wasm2es6js.exe
    Installing C:\Users\Outpox\AppData\Local\.wasm_pack\.wasm-bindgen-cargo-install-0.2.38\bin\wasm-bindgen-test-runner
    Installing C:\Users\Outpox\AppData\Local\.wasm_pack\.wasm-bindgen-cargo-install-0.2.38\bin\wasm-bindgen.exe
  warning: be sure to add `C:\Users\Outpox\AppData\Local\.wasm_pack\.wasm-bindgen-cargo-install-0.2.38\bin` to your PAT
| [10/10] Running WASM-bindgen...
Well, this is embarrassing.

wasm-pack had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "C:\Users\Outpox\AppData\Local\Temp\report-a8a39dbd-3b13-4db8-b01e-1585ef3719ca.toml". Submit an issue or email with the subject of "wasm-pack Crash Report" and include the report as an attachment.

- Authors: Ashley Williams <[email protected]>

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!

And the report file is

name = 'wasm-pack'
operating_system = 'windows'
crate_version = '0.6.0'
explanation = '''
Panic occurred in file 'binary-install\src\lib.rs' at line 231
'''
method = 'Panic'
backtrace = '''
stack backtrace:
   0: <no info> (0x7ff6e7981f65)
   1: <no info> (0x7ff6e798117c)
   2: <no info> (0x7ff6e798108a)
   3: <no info> (0x7ff6e78e2007)
   4: <no info> (0x7ff6e78e198a)
   5: <no info> (0x7ff6e76e294b)
   6: <no info> (0x7ff6e79a1442)
   7: <no info> (0x7ff6e79a0f44)
   8: <no info> (0x7ff6e79a0e92)
   9: <no info> (0x7ff6e778e5c3)
  10: <no info> (0x7ff6e76ee5a5)
  11: <no info> (0x7ff6e7774745)
  12: <no info> (0x7ff6e7773135)
  13: <no info> (0x7ff6e76fcdc9)
  14: <no info> (0x7ff6e76e2445)
  15: <no info> (0x7ff6e76e2d66)
  16: <no info> (0x7ff6e79a0d87)
  17: <no info> (0x7ff6e79bbc22)
  18: <no info> (0x7ff6e79a9da3)
  19: <no info> (0x7ff6e76e29ca)
  20: <no info> (0x7ff6e7a04279)
  21: BaseThreadInitThunk (0x7fff15c83dc4)'''

馃 Expected Behavior

It should build.

馃憻 Steps to reproduce

I've just created a new project on Windows 10 by following the game of life book.
The error occurred when I ran wasm-pack.

馃實 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.6.0
rustc version: 1.33.0
os: Windows 10

I've found a related issue: #512 where you suggested to manually install wasm-bindgen which I tried. However I've got the following error:

PS C:\Users\Outpox\Projects\wasm-game-of-life> cargo install wasm-bindgen
    Updating crates.io index
  Installing wasm-bindgen v0.2.38
error: specified package has no binaries

I'd blindly guess that wasm-bindgen has not yet been build against the 1.33.0 compiler for Windows?

(Btw I was able to make this work on Linux Mint earlier today).

bug user report

Most helpful comment

this seems like it is fixed! closing- please reopen or file a new issue if this is still an issue.

All 4 comments

Same error on ubuntu. Trying to build wasm-bindgen examples.


backtrace

name = 'wasm-pack'
operating_system = 'unix:Ubuntu'
crate_version = '0.6.0'
explanation = '''
Panic occurred in file '/home/alexlapa/.cargo/registry/src/github.com-1ecc6299db9ec823/binary-install-0.0.1/src/lib.rs' at line 231

method = 'Panic'
backtrace = '''
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized::h68f4c288b01651fb (0x5606fc8b2f16)
   1: backtrace::capture::Backtrace::create::h3235aebdf2efc1c2 (0x5606fc8b2337)
   2: backtrace::capture::Backtrace::new::h17b64cb838892cff (0x5606fc8b225d)
   3: human_panic::report::Report::new::h5e76aee0918094e5 (0x5606fc80e392)
   4: human_panic::handle_dump::hba2fd17e54f8795a (0x5606fc80da67)
   5: wasm_pack::main::{{closure}}::h40fd320403fe4aa8 (0x5606fc5e33c8)
   6: std::panicking::rust_panic_with_hook::h744417edfe714d72 (0x5606fc8de179)
             at src/libstd/panicking.rs:482
   7: std::panicking::continue_panic_fmt::h3557b3c3fa21b47b (0x5606fc8ddc21)
             at src/libstd/panicking.rs:385
   8: std::panicking::begin_panic_fmt::h376894437226fc7c (0x5606fc8ddb6e)
             at src/libstd/panicking.rs:340
   9: binary_install::Download::binary::h72db0011bf93dc37 (0x5606fc67bf07)
  10: wasm_pack::bindgen::wasm_bindgen_build::h4872b6fd43fbc0e6 (0x5606fc61766e)
  11: wasm_pack::command::build::Build::step_run_wasm_bindgen::h31f15866be60a476 (0x5606fc66b168)
  12: wasm_pack::command::build::Build::run::h4a0db3ed744ddf5a (0x5606fc669c95)
  13: wasm_pack::command::run_wasm_pack::ha0faeb43ba95150d (0x5606fc5e988f)
  14: wasm_pack::main::h32974bd7a3dbe7f0 (0x5606fc5e2f3e)
  15: std::rt::lang_start::{{closure}}::h5240f7f0c006e7bf (0x5606fc5e3e72)
  16: std::rt::lang_start_internal::{{closure}}::h8ad4264c6b68797c (0x5606fc8ddaa2)
             at src/libstd/rt.rs:49
      std::panicking::try::do_call::h7a0381557c6c2cee
             at src/libstd/panicking.rs:297
  17: __rust_maybe_catch_panic (0x5606fc8e8089)
             at src/libpanic_unwind/lib.rs:92
  18: std::panicking::try::h72cb0fef6e9c0ab1 (0x5606fc8de6b5)
             at src/libstd/panicking.rs:276
      std::panic::catch_unwind::hbff071ae76e6f224
             at src/libstd/panic.rs:388
      std::rt::lang_start_internal::he0d8d06abc6f912f
             at src/libstd/rt.rs:48
  19: main (0x5606fc5e3441)
  20: __libc_start_main (0x7f3692b0a09a)
  21: _start (0x5606fc5dcfc9)
  22: <unknown> (0x0)'''

@Outpox ,

manually running cargo install wasm-bindgen-cli according to https://github.com/rustwasm/wasm-pack/issues/512 fixed this issue for me.

Oh right that's my bad. I did cargo install wasm-bindgen instead of cargo install wasm-bindgen-cli.
Using the correct command I was able to build the project.

this seems like it is fixed! closing- please reopen or file a new issue if this is still an issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ishitatsuyuki picture ishitatsuyuki  路  5Comments

xtuc picture xtuc  路  5Comments

arthmis picture arthmis  路  5Comments

turboladen picture turboladen  路  4Comments

rpjohnst picture rpjohnst  路  5Comments