1

I'm having the issue both from my chrome extension's content script and from the chrome dev console, so I'm guessing it's probably not related to the Chrome extension.

I have a button with the following code:

okButton.onclick = async () => {
   (await navigator.usb.requestDevice({ filters: [] })).open()
 }

Screenshot

1

When clicked, the device popup opens, I select the USB device (a DYMO M25 postal weight scale) and click connect, but then I'm getting the following error:

Failed to execute 'open' on 'USBDevice': Access denied.

Note: when I try again, I see the device marked as Paired (and then the same error happens again).

I saw this post that talks about a driver solution, but I'm hoping I can find a way around this without having users (of my Chrome extension) to install anything else. The web usb tester mentioned (here) in the post gives me the same error in the chrome console.

Note2: I can connect no problem to the device via NodeJS (using the 'usb' module)

Any ideas? Thanks!

vimuth
  • 5,064
  • 33
  • 79
  • 116
Alex
  • 31
  • 3
  • I didn't manage to solve this permission issue with navigator.usb, but I managed to read the scale's data using navigator.hid instead, details in this post: https://stackoverflow.com/questions/75189339/decoding-arraybuffer-data-from-a-usb-device-via-navigator-hid – Alex Jan 21 '23 at 01:33
  • getting same error, can anyone help for this error – Pragnesh May 30 '23 at 14:09

0 Answers0