wasm-pack icon indicating copy to clipboard operation
wasm-pack copied to clipboard

wasm-pack 0.13.1 installs wrong `geckodriver` binary on M2 Mac: x86_64, not arm64

Open jsdw opened this issue 1 year ago • 0 comments

Hey there!

Running:

cargo install wasm-pack
# navigate to folder to run wasm tests
wasm-pack test --headless --firefox

Leads to:

[INFO]: Getting geckodriver...
warning: /Users/jameswilson/Work/subxt/signer/Cargo.toml: unused manifest key: dependencies.codec.package
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.12s
     Running tests/wasm.rs (target/wasm32-unknown-unknown/debug/deps/wasm-4b989a005c9981c4.wasm)
Set timeout to 20 seconds...
Error: failed to spawn "/Users/jameswilson/Library/Caches/.wasm-pack/geckodriver-5a3d64f9bfa379e5/geckodriver" binary

Caused by:
    Bad CPU type in executable (os error 86)
error: test failed, to rerun pass `--test wasm`

When I run file /Users/jameswilson/Library/Caches/.wasm-pack/geckodriver-5a3d64f9bfa379e5/geckodriver I see:

/Users/jameswilson/Library/Caches/.wasm-pack/geckodriver-5a3d64f9bfa379e5/geckodriver: Mach-O 64-bit executable x86_64

The binary should be arm64, so I suspect it's downloading a precompiled one but for the wrong platform.

(as an aside, wasm-pack test --headless --chrome runs without issue)

Let me know if I can provide any more information to help!

jsdw avatar Nov 12 '24 15:11 jsdw