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

User canceled the requestDevice() chooser #4

Open
shammond42 opened this issue Jan 13, 2024 · 7 comments
Open

User canceled the requestDevice() chooser #4

shammond42 opened this issue Jan 13, 2024 · 7 comments
Labels
bug Functionality which is not working as intended

Comments

@shammond42
Copy link

I am seeing this error message when I click the "Add Pixel Dice" button.

NotFoundError: User canceled the requestDevice() chooser.

This happen when running the foundry application or using Chrome. It also happens on both Windows and Mac. The version of foundry in use is Version 11 Stable, build 315.

@aaclayton aaclayton added the bug Functionality which is not working as intended label Jan 15, 2024
@ShadowDrakken
Copy link

ShadowDrakken commented Mar 2, 2024

Same, Windows 11, Foundry v11.315, Unfulfilled Rolls v0.1.4, Pixels v0.1.0

Additional information: the error only appears to be happening in the Foundry desktop app, works fine connecting through a web browser.

@CodyNguyen235
Copy link

Is there any more information regarding this issue? I noticed there hasn't been an update to this module since February. Tested on Foundry v12 Application and it appears to still be occurring.

@NonchalantWombat
Copy link

Commenting to give visibility; same issue, not working in V12 for me (on V0.2.0)

@181raven
Copy link

181raven commented Oct 6, 2024

Same issue persisting here, trying to bump for visibility

@blalasaadri
Copy link

Disclaimer: I'm not in any way connected to the development of this integration, but I have seen this problem before.

The integration won't work in the desktop app, because the desktop app does not implement a Bluetooth device selection screen. It will only work in a Chromium based browser that has WebBluetooth enabled. (You can check caniuse.com for many browsers.)
This is something that Foundry could in theory change by implementing a selection screen, but it's not an issue with this integration.

WebBluetooth also requires an HTTPS connection, which means it needs an SSL certificate. There is a tutorial on how to install that certificate here. It can be a self-signed certificate though. (You will get warnings about the certificate being self-signed, but that's OK.)
This is something required by the Web Bluetooth API (as mentioned, though not explained in detail, in this entry in the mdn web docs) for security reasons, so there's nothing the devs behind this integration or Foundry as a whole can realistically do about it.

If either of these conditions is not met, you will certainly get the reported error message. If anyone is having this issue despite meeting both requirements though, that would surely be useful to know for the devs.

@ShadowDrakken
Copy link

Thing is, Foundry uses Electron, which is a Chromium based wrapper so it SHOULD support WebBluetooth.

That aside, a solution would be to break out of Electron for the desktop client and hook into bluetooth natively. Doesn't solve the issue for non-supported browsers, but fixes it for the host app at least.

@blalasaadri
Copy link

Thing is, Foundry uses Electron, which is a Chromium based wrapper so it SHOULD support WebBluetooth.

Electron does support WebBluetooth. It just doesn't have a pre-existing Bluetooth device selection window. Which is why the error described here is shown.
If one were to build that kind of selector, it would work. But that's something that would have to be built as part of Foundry, I don't think this integration can reasonably do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended
Projects
None yet
Development

No branches or pull requests

8 participants
@shammond42 @ShadowDrakken @aaclayton @blalasaadri @NonchalantWombat @CodyNguyen235 @181raven and others