Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TxClient in wasm failed with: Cannot perform Construct on a detached ArrayBuffer #555

Open
zvolin opened this issue Feb 26, 2025 · 0 comments
Labels
grpc Related to `celestia-grpc` wasm Targets browsers / wasm32-unknown-unknown

Comments

@zvolin
Copy link
Member

zvolin commented Feb 26, 2025

Caught on CI for ebbaaea

[INFO]: 🎯  Checking for the Wasm target...
   Compiling celestia-proto v0.7.0 (/home/runner/work/lumina/lumina/proto)
   Compiling celestia-grpc-macros v0.2.0 (/home/runner/work/lumina/lumina/grpc/grpc-macros)
   Compiling celestia-types v0.10.1 (/home/runner/work/lumina/lumina/types)
   Compiling celestia-grpc v0.2.1 (/home/runner/work/lumina/lumina/grpc)
    Finished `dev` profile [unoptimized] target(s) in 35.57s
[INFO]: ⬇️  Installing wasm-bindgen...
    Finished `test` profile [unoptimized] target(s) in 0.20s
     Running unittests src/lib.rs (/home/runner/work/lumina/lumina/target/wasm32-unknown-unknown/debug/deps/celestia_grpc-730726b68f6e32fe.wasm)
no tests to run!
     Running tests/tonic.rs (/home/runner/work/lumina/lumina/target/wasm32-unknown-unknown/debug/deps/tonic-0a60b64dc0c378db.wasm)
                                                  
Set timeout to 120 seconds...
Executing bindgen...                              
                                                  
Running headless tests in Chrome on `http://127.0.0.1:44773/`
Try find `webdriver.json` for configure browser's capabilities:
Not found
Starting new webdriver session...                 
Visiting http://127.0.0.1:45979...                
Loading page elements...                          
Waiting for test to finish...                     
                                                  
Failed to detect test as having been run. It might have timed out.
output div contained:
    running 11 tests
    test submit_message_insufficient_gas_price_and_limit ... ok
    test submit_message ... ok
    test submit_blobs_insufficient_gas_price_and_limit ... ok

console.log div contained:
    wasm-bindgen: imported JS function that was not marked as `catch` threw an error:
    Cannot perform Construct on a detached ArrayBuffer
    
    Stack:
    TypeError: Cannot perform Construct on a detached ArrayBuffer
        at new Uint8Array (<anonymous>)
        at http://127.0.0.1:45979/wasm-bindgen-test:821:21
        at logError (http://127.0.0.1:45979/wasm-bindgen-test:15:18)
        at imports.wbg.__wbg_new_a12002a7f91c75be (http://127.0.0.1:45979/wasm-bindgen-test:820:66)
        at tonic-0a60b64dc0c378db.wasm.__wbg_new_a12002a7f91c75be externref shim (http://127.0.0.1:45979/wasm-bindgen-test_bg.wasm:wasm-function[11739]:0x3d8547)
        at tonic-0a60b64dc0c378db.wasm.js_sys::Uint8Array::new::hd19c385c5c06e79c (http://127.0.0.1:45979/wasm-bindgen-test_bg.wasm:wasm-function[6907]:0x393fcd)
        at tonic-0a60b64dc0c378db.wasm.<js_sys::Uint8Array as core::convert::From<&[u8]>>::from::hef436ecde67c2879 (http://127.0.0.1:45979/wasm-bindgen-test_bg.wasm:wasm-function[6249]:0x3829b3)
        at tonic-0a60b64dc0c378db.wasm.tonic_web_wasm_client::call::prepare_body::{{closure}}::{{closure}}::h3ef7b83f9a746715 (http://127.0.0.1:45979/wasm-bindgen-test_bg.wasm:wasm-function[6865]:0x392eda)
        at tonic-0a60b64dc0c378db.wasm.core::option::Option<T>::map::h1480b2b09967572e (http://127.0.0.1:45979/wasm-bindgen-test_bg.wasm:wasm-function[3005]:0x2f3d70)
        at tonic-0a60b64dc0c378db.wasm.tonic_web_wasm_client::call::prepare_body::{{closure}}::h60cd4ae367056104 (http://127.0.0.1:45979/wasm-bindgen-test_bg.wasm:wasm-function[846]:0x1e11ef)

                                                  
driver status: signal: 9 (SIGKILL)
driver stdout:
    Starting ChromeDriver 133.0.6943.126 (cffa127ce7b6be72885391527c15b452056a2e81-refs/branch-heads/6943@{#1570}) on port 44773
    Only local connections are allowed.
    Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
    ChromeDriver was started successfully on port 44773.

Error: some tests failed

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: wasm_bindgen_test_runner::headless::run
   2: wasm_bindgen_test_runner::main
   3: std::sys::backtrace::__rust_begin_short_backtrace
   4: std::rt::lang_start::{{closure}}
   5: std::rt::lang_start_internal
   6: main
@zvolin zvolin added grpc Related to `celestia-grpc` wasm Targets browsers / wasm32-unknown-unknown labels Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grpc Related to `celestia-grpc` wasm Targets browsers / wasm32-unknown-unknown
Projects
None yet
Development

No branches or pull requests

1 participant