Skip to content

Panic on setting chromedriver option. #1304

Closed
@Myriad-Dreamin

Description

@Myriad-Dreamin

🐛 Bug description

Describe your issue in detail.

The bug occurs both in Windows and Linux platform.

name = "wasm-pack"
operating_system = "Ubuntu 22.04 (jammy) [64-bit]"
crate_version = "0.12.0"
explanation = """
Panic occurred in file '/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.3.4/src/parser/error.rs' at line 32
"""
cause = """
Mismatch between definition and access of `chromedriver`. Could not downcast to TypeId { t: 2889023590509219037 }, need to downcast to TypeId { t: 8793666978155995384 }
"""
method = "Panic"
backtrace = """

   0: 0x7f1c9f69a46f - clap_builder::parser::matches::arg_matches::ArgMatches::remove_one::h1071d0569289c63d
   1: 0x7f1c9f6d0acb - <wasm_pack::command::test::TestOptions as clap_builder::derive::FromArgMatches>::from_arg_matches_mut::hb156d20062f3843d
   2: 0x7f1c9f67f255 - <wasm_pack::command::Command as clap_builder::derive::FromArgMatches>::from_arg_matches_mut::hc8a723b38de367c4
   3: 0x7f1c9f6a0e31 - <wasm_pack::Cli as clap_builder::derive::FromArgMatches>::from_arg_matches_mut::h74f30b65f521504b
   4: 0x7f1c9f64ff49 - clap_builder::derive::Parser::parse::h5ff6f522ae10d2e3
   5: 0x7f1c9f65c025 - wasm_pack::main::h55c39ae12c5d0b3d
   6: 0x7f1c9f651f33 - std::sys_common::backtrace::__rust_begin_short_backtrace::h181e499eb01a8f78
   7: 0x7f1c9f652199 - std::rt::lang_start::{{closure}}::h0af72dc99aa94b9c
   8: 0x7f1c9f96e842 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h826ec84f4d22172a
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287
                 - std::panicking::try::do_call::h330f41e7cdb66fa2
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
                 - std::panicking::try::h30d9a927415799ae
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
                 - std::panic::catch_unwind::h0f7d81e60d1c7508
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::{{closure}}::h91e177ac1f827128
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::haf26aa5893f5930f
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
                 - std::panicking::try::hd1a491374a98c81c
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
                 - std::panic::catch_unwind::h9d9e54dec05b7526
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::hebd4e8d348b0ef95
                at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
   9: 0x7f1c9f65c865 - main"""

🤔 Expected Behavior

What should have happened?

Don't panic.

👟 Steps to reproduce

Clear steps describing how to reproduce the issue, including commands and flags run. If you are seeing an error, please include the full error message and stack trace.

Run a command with chromedriver option:

"wasm-pack" "test" "--release" "--chromedriver" "abc" "--chrome" "--headless" 

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: 0.12.0 (install by official script)
rustc version: rustc 1.70.0 (90c541806 2023-05-31)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions