Open scheib opened 6 years ago
The error is as follows:
Uncaught (in promise) TypeError: Failed to read the 'query' property from 'Permissions': The provided value 'usb' is not a valid enum value of type PermissionName.
Chrome does not yet support WebUSB in the permissions API. This is tracked by Chromium issue 638721.
Hi.. is this still not supported by chrome? I am trying to use web usb but when I call device.open it throws me "Access denied" error. any suggestions will be appreciated. Thanks
Hi @jogshraddha, WebUSB is enabled by default on Chrome since 61. There are a couple of reasons that may be producing this error. The first is that the origin does not have permission to open the USB device. This can happen on Android if the device has revoked access to the USB device. The second reason is that Chrome failed to grab the device handle. If you are still unable to open the device, please file a bug report at https://crbug.com/ with details on how to reproduce the issue. I hope that this helps.
I tried this, but I got only errors
await navigator.permissions.query({name:'usb', filters: []})