Skip to content

[BUG] worker-build panics with wasm-bindgen stack error on Leptos SSR project #772

@rafiyq

Description

@rafiyq

Is there an existing issue for this?

  • I have searched the existing issues

What version of workers-rs are you using?

0.6

What version of wrangler are you using?

0.0.0

Describe the bug

thread 'main' panicked at crates/wasm-interpreter/src/lib.rs:247:21:
Read a negative address value from the stack. Did we run out of memory?
stack backtrace:
0: 0x7ffff7dd6fba - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h1b0a18077ca6f698
1: 0x7ffff7e0ea23 - core::fmt::write::hd43e6d3ae51a933a
2: 0x7ffff7dd3da3 - std::io::Write::write_fmt::h4ee05bd9b08ac54b
3: 0x7ffff7dd6e02 - std::sys::backtrace::BacktraceLock::print::ha3954179cd001b41
4: 0x7ffff7dd7ffc - std::panicking::default_hook::{{closure}}::h2616e6aececc1d57
5: 0x7ffff7dd7e42 - std::panicking::default_hook::h802ff2df8b0845d7
6: 0x7ffff7dd85d7 - std::panicking::rust_panic_with_hook::h9fe787d554af4a59
7: 0x7ffff7dd846a - std::panicking::begin_panic_handler::{{closure}}::h8ebf843250dc76c5
8: 0x7ffff7dd7499 - std::sys::backtrace::__rust_end_short_backtrace::hc79e3420d69100d5
9: 0x7ffff7dd80fc - rust_begin_unwind
10: 0x7ffff7a65420 - core::panicking::panic_fmt::h97f8f4814adeada4
11: 0x7ffff7c25059 - wasm_bindgen_wasm_interpreter::Interpreter::call::h6c25d019e9095517
12: 0x7ffff7c2498a - wasm_bindgen_wasm_interpreter::Interpreter::call::h6c25d019e9095517
13: 0x7ffff7c2498a - wasm_bindgen_wasm_interpreter::Interpreter::call::h6c25d019e9095517
14: 0x7ffff7c23c63 - wasm_bindgen_wasm_interpreter::Interpreter::interpret_descriptor::h4a1bae2238e14812
15: 0x7ffff7b7cfb6 - wasm_bindgen_cli_support::descriptors::execute::h0b5b3434915877c6
16: 0x7ffff7b60cb9 - wasm_bindgen_cli_support::Bindgen::generate_output::hbefd37f485a41f58
17: 0x7ffff7a79e90 - wasm_bindgen_cli_support::Bindgen::generate::h9a43d2571a5f78be
18: 0x7ffff7a69124 - wasm_bindgen::main::h4eefa347f9430b32
19: 0x7ffff7a75b93 - std::sys::backtrace::__rust_begin_short_backtrace::h65830e6f1b4b7a63
20: 0x7ffff7a75b89 - std::rt::lang_start::{{closure}}::hb05ca391a588479e
21: 0x7ffff7dcaf07 - std::rt::lang_start_internal::h7f0356c9ce128abe
22: 0x7ffff7a73715 - main
Error: Running the wasm-bindgen CLI

Caused by:
failed to execute wasm-bindgen: exited with exit status: 101
full command: "/home/user/.cache/.wasm-pack/wasm-bindgen-c59d5019a2b42393/wasm-bindgen" "/home/user/my-app/target/wasm32-unknown-unknown/release/my_app.wasm" "--out-dir" "/home/user/my-app/build" "--typescript" "--target" "bundler" "--out-name" "index"

Stack backtrace:
0: anyhow::error::::msg
1: wasm_pack::child::run
2: wasm_pack::bindgen::wasm_bindgen_build
3: wasm_pack::command::build::Build::step_run_wasm_bindgen
4: wasm_pack::command::build::Build::run
5: worker_build::main
6: std::sys::backtrace::__rust_begin_short_backtrace
7: std::rt::lang_start::{{closure}}
8: std::rt::lang_start_internal
9: main
10: __libc_start_call_main
11: __libc_start_main_alias_2
12: _start

Steps To Reproduce

  1. $ cargo generate cloudflare/workers-rs with nightly
  2. $ cargo leptos build --release
  3. $ RUST_BACKTRACE=full LEPTOS_OUTPUT_NAME=my-app worker-build --release --features ssr

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions