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

wasm panic in Firefox because of missing getGamePads API #4431

Closed
superdump opened this issue Apr 6, 2022 · 1 comment
Closed

wasm panic in Firefox because of missing getGamePads API #4431

superdump opened this issue Apr 6, 2022 · 1 comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior C-Startup A crash that occurs when first attempting to run a Bevy app P-Crash A sudden unexpected crash

Comments

@superdump
Copy link
Contributor

Bevy version

main f907d67d7ed5cfd8b11b2ad78e9dfd6eeb913cea

Operating system & version

macOS 12.3

What you did

Run the lighting example

What you expected to happen

The example runs.

What actually happened

The example panics.

Additional information

panicked at 'error getting gamepads: JsValue(TypeError: getObject(...).getGamepads is not a function
init/imports.wbg.__wbg_getGamepads_125e8440ea7a98c8/<@http://0.0.0.0:8000/target/wasm_example.js:1071:35
handleError@http://0.0.0.0:8000/target/wasm_example.js:260:18
init/imports.wbg.__wbg_getGamepads_125e8440ea7a98c8@http://0.0.0.0:8000/target/wasm_example.js:1070:74
web_sys::features::gen_Navigator::Navigator::get_gamepads::h38f15820bcd54585@http://0.0.0.0:8000/target/wasm_example_bg.wasm:wasm-function[17624]:0x9e4430
gilrs_core::platform::platform::gamepad::Gilrs::next_event::ha502708d74993467@http://0.0.0.0:8000/target/wasm_example_bg.wasm:wasm-function[659]:0x24484f
gilrs_core::Gilrs::next_event::h1def7b279c39043e@http://0.0.0.0:8000/target/wasm_example_bg.wasm:wasm-function[25101]:0xa1cd38
gilrs::gamepad::Gilrs::next_event_priv::h581e4e4191b9fd6b@http://0.0.0.0:8000/target/wasm_example_bg.wasm:wasm-function[719]:0x272637
gilrs::gamepad::Gilrs::next_event::h795f889b0d271268@http:/…
wasm_example.js:420:21
@superdump superdump added C-Bug An unexpected or incorrect behavior A-Input Player input via keyboard, mouse, gamepad, and more P-Crash A sudden unexpected crash C-Startup A crash that occurs when first attempting to run a Bevy app labels Apr 6, 2022
@rparrett
Copy link
Contributor

rparrett commented Apr 6, 2022

Seems like this is only an issue in non-https contexts, at least

https://gitlab.com/gilrs-project/gilrs/-/issues/115

@bors bors bot closed this as completed in c46691c May 30, 2022
james7132 added a commit to james7132/bevy that referenced this issue Jun 7, 2022
# Objective
Fixes bevyengine#4353. Fixes bevyengine#4431. Picks up fixes for a panic for `gilrs` when `getGamepads()` is not available. 

## Solution
Update the `gilrs` to `v0.9.0`. Changelog can be seen here: https://gitlab.com/gilrs-project/gilrs/-/commit/dba36f91869c823fb66f8633d2b650b430682f80

EDIT: Updated `uuid` to 1.1 to avoid duplicate dependencies. Added `nix`'s two dependencies as exceptions until `rodio` updates their deps.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective
Fixes bevyengine#4353. Fixes bevyengine#4431. Picks up fixes for a panic for `gilrs` when `getGamepads()` is not available. 

## Solution
Update the `gilrs` to `v0.9.0`. Changelog can be seen here: https://gitlab.com/gilrs-project/gilrs/-/commit/dba36f91869c823fb66f8633d2b650b430682f80

EDIT: Updated `uuid` to 1.1 to avoid duplicate dependencies. Added `nix`'s two dependencies as exceptions until `rodio` updates their deps.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Bug An unexpected or incorrect behavior C-Startup A crash that occurs when first attempting to run a Bevy app P-Crash A sudden unexpected crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants