deno_sqlite_plugin icon indicating copy to clipboard operation
deno_sqlite_plugin copied to clipboard

Does not work under WSL, panic at Result::unwrap(), Error: "expected value"

Open chanibal opened this issue 5 years ago • 1 comments

When trying to run example from the README with downloaded so file, an error occurs:

deno run --unstable --allow-plugin sqlite.ts:

Check (...snip...) /sqlite-test/sqlite.ts
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error("expected value", line: 1, column: 1)', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
fatal runtime error: failed to initiate panic, error 5
Aborted

With backtrace: RUST_BACKTRACE=1 deno run --unstable --allow-plugin sqlite.ts

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error("expected value", line: 1, column: 1)', src/libcore/result.rs:1188:5
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <deno::ops::plugin::PluginInterface as deno_core::plugin_api::Interface>::register_op::{{closure}}
  11: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
  12: deno::metrics::metrics_op::{{closure}}
  13: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
  14: <extern "C" fn(A0) .> R as rusty_v8::support::CFnFrom<F>>::mapping::c_fn
  15: _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE
  16: _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE
  17: _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE
  18: Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
fatal runtime error: failed to initiate panic, error 5
Aborted

Windows 10 pro 2004 (build 19041.630), 64 bit
WSL2 with Ubuntu 20.1.4, kernel 4.19.128 deno 1.5.2 (71d7482, release, x86_64-unknown-linux-gnu)
v8 8.7.220.3
typescript 4.0.5

chanibal avatar Nov 12 '20 14:11 chanibal

Even more interesting, it breaks during building:

RUST_BACKTRACE=full cargo build --release:

   Compiling rusqlite v0.23.1
   Compiling futures-util v0.3.4
   Compiling serde_json v1.0.53
   Compiling rusty_v8 v0.4.2
error: failed to run custom build command for `rusty_v8 v0.4.2`

Caused by:
  process didn't exit successfully: `/c/Projekty/deno_sqlite_plugin/target/release/build/rusty_v8-57a2e412c48ed4b4/build-script-build` (exit code: 101)
  --- stdout
  static lib URL: https://github.com/denoland/rusty_v8/releases/download/v0.4.2/librusty_v8_release_x86_64-unknown-linux-gnu.a
  cargo:rustc-link-search=/c/Projekty/deno_sqlite_plugin/target/release/gn_out/obj
  Downloading https://github.com/denoland/rusty_v8/releases/download/v0.4.2/librusty_v8_release_x86_64-unknown-linux-gnu.a

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/chanibal/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.4.2/build.rs:228:8
  stack backtrace:
     0:     0x562a1186f1f0 - std::backtrace_rs::backtrace::libunwind::trace::h577ea05e9ca4629a
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
     1:     0x562a1186f1f0 - std::backtrace_rs::backtrace::trace_unsynchronized::h50b9b72b84c7dd56
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/../../backtrace/src/backtrace/mod.rs:66
     2:     0x562a1186f1f0 - std::sys_common::backtrace::_print_fmt::h6541cf9823837fac
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:79
     3:     0x562a1186f1f0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf64fbff071026df5
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:58
     4:     0x562a1188d42c - core::fmt::write::h9ddafa4860d8adff
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/fmt/mod.rs:1082
     5:     0x562a1186be87 - std::io::Write::write_fmt::h1d2ee292d2b65481
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/io/mod.rs:1514
     6:     0x562a11871480 - std::sys_common::backtrace::_print::ha25f9ff5080d886d
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:61
     7:     0x562a11871480 - std::sys_common::backtrace::print::h213e8aa8dc5405c0
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:48
     8:     0x562a11871480 - std::panicking::default_hook::{{closure}}::h6482fae49ef9d963
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:200
     9:     0x562a118711cc - std::panicking::default_hook::he30ad7589e0970f9
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:219
    10:     0x562a11871ae3 - std::panicking::rust_panic_with_hook::haa1ed36ada4ffb03
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:569
    11:     0x562a118716b9 - std::panicking::begin_panic_handler::{{closure}}::h7001af1bb21aeaeb
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:476
    12:     0x562a1186f67c - std::sys_common::backtrace::__rust_end_short_backtrace::h39910f557f5f2367
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:153
    13:     0x562a11871679 - rust_begin_unwind
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
    14:     0x562a1188c751 - core::panicking::panic_fmt::h4e2659771ebc78eb
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
    15:     0x562a1188c573 - core::option::expect_none_failed::h448b58a024c2c33a
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
    16:     0x562a118214bb - core::result::Result<T,E>::unwrap::hd3da49b69d141551
    17:     0x562a1181e1ee - build_script_build::download_static_lib_binaries::h84749cfcce38d1fe
    18:     0x562a1181b371 - build_script_build::main::hef47bb4f4a131afc
    19:     0x562a11820473 - core::ops::function::FnOnce::call_once::h0b76c8493d65c967
    20:     0x562a11826f09 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc3ab6f941b0a64c8
    21:     0x562a11822ea9 - std::rt::lang_start::{{closure}}::h470ed0c153fcd45a
    22:     0x562a11871ee1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h6a3209f124be2235
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ops/function.rs:259
    23:     0x562a11871ee1 - std::panicking::try::do_call::h88ce358792b64df0
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:373
    24:     0x562a11871ee1 - std::panicking::try::h6311c259678e50fc
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:337
    25:     0x562a11871ee1 - std::panic::catch_unwind::h56c5716807d659a1
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panic.rs:379
    26:     0x562a11871ee1 - std::rt::lang_start_internal::h73711f37ecfcb277
                                 at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/rt.rs:51
    27:     0x562a11822e88 - std::rt::lang_start::h44277de32aa21767
    28:     0x562a1181f2ab - main
    29:     0x7fbe5f3b20b3 - __l

But why does building download a .a file from your github?

chanibal avatar Nov 12 '20 14:11 chanibal