USBDevice.open() throws Security Error with Access denied

32 views
Skip to first unread message

Cris G

unread,
Jul 3, 2019, 6:41:12 PM7/3/19
to Chromium-dev
I have been using a Mettler Toledo PS60 scale to poll the weight into an input field on a web page using the usb api. It used to work fine until about a year ago. Now I get a Security Error with the message "Access denied." I am using the latest version of Google Chrome on Windows 10. I am not sure if for some reason an updated version of Chrome disabled this feature or device. I can still see the scale device in devices and I can pair it but for some reason I cannot USBDevice.open() it. Any feedback would be appreciated. Thanks!

Device Log:
[16:53:27] HID device added: vendorId=3768, productId=61440, name='PS60 ', serial='61771936', deviceId='\\?\hid#vid_0eb8&pid_f000#6&29632891&4&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'

Vincent Scheib

unread,
Jul 3, 2019, 7:13:34 PM7/3/19
to cgg...@gmail.com, devic...@chromium.org, Chromium-dev
Thanks, please send bug reports via crbug.com.  https://developers.google.com/web/feedback/file-a-bug has helpful tips.

Because Chromium developers won't have that device, it would help if you're able to bisect builds to narrow down when the regression occurred.  (You might check first by manually downloading an old version to verify it is a Chrome regression and not a change in Windows, drivers, etc.)


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/cfca8470-4514-47c8-ba52-878724632c9b%40chromium.org.

Reilly Grant

unread,
Jul 3, 2019, 8:36:04 PM7/3/19
to Vincent Scheib, cgg...@gmail.com, DeviceDev, Chromium-dev
The access denied error is because Windows has loaded the generic HID class driver for the device, which blocks Chrome from accessing the device as a generic USB device. This might have happened automatically as part of a Windows driver update. You can either force Windows to load the generic WinUSB driver instead or wait for the upcoming WebHID API which will support devices that implement the HID protocol.
Reilly Grant | Software Engineer | rei...@chromium.org | Google Chrome


You received this message because you are subscribed to the Google Groups "DeviceDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to device-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/device-dev/CAK-EfX%3D2%2BD1Ha%2BoYj50OeOwq3wtPj-AJPAxjzMqhKo6EuraC%2BA%40mail.gmail.com.

Cris G

unread,
Jul 8, 2019, 3:44:04 PM7/8/19
to Chromium-dev, sch...@chromium.org, cgg...@gmail.com, devic...@chromium.org
How would I go about forcing Windows to load the generic WinUSB driver for the HID device? I tried selecting Update Drivers and went to window where I can pick from list of drivers and selected "Have Disk" and then I search for winusb driver in System32 > DriverStore > FileRepository > winusb.inf_amd64_144aebaa418437c6. But when I select it to install it it gives me this error: "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems." Appreciate the help!


On Wednesday, July 3, 2019 at 5:36:04 PM UTC-7, Reilly Grant wrote:
The access denied error is because Windows has loaded the generic HID class driver for the device, which blocks Chrome from accessing the device as a generic USB device. This might have happened automatically as part of a Windows driver update. You can either force Windows to load the generic WinUSB driver instead or wait for the upcoming WebHID API which will support devices that implement the HID protocol.
Reilly Grant | Software Engineer | rei...@chromium.org | Google Chrome


On Wed, Jul 3, 2019 at 4:12 PM Vincent Scheib <sch...@chromium.org> wrote:
Thanks, please send bug reports via crbug.com.  https://developers.google.com/web/feedback/file-a-bug has helpful tips.

Because Chromium developers won't have that device, it would help if you're able to bisect builds to narrow down when the regression occurred.  (You might check first by manually downloading an old version to verify it is a Chrome regression and not a change in Windows, drivers, etc.)


On Wed, Jul 3, 2019 at 3:41 PM Cris G <cgg...@gmail.com> wrote:
I have been using a Mettler Toledo PS60 scale to poll the weight into an input field on a web page using the usb api. It used to work fine until about a year ago. Now I get a Security Error with the message "Access denied." I am using the latest version of Google Chrome on Windows 10. I am not sure if for some reason an updated version of Chrome disabled this feature or device. I can still see the scale device in devices and I can pair it but for some reason I cannot USBDevice.open() it. Any feedback would be appreciated. Thanks!

Device Log:
[16:53:27] HID device added: vendorId=3768, productId=61440, name='PS60 ', serial='61771936', deviceId='\\?\hid#vid_0eb8&pid_f000#6&29632891&4&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromi...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "DeviceDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devic...@chromium.org.

Cristian Garneata

unread,
Jul 8, 2019, 5:12:02 PM7/8/19
to Reilly Grant, Vincent Scheib, DeviceDev, Chromium-dev
How would I go about forcing Windows to load the generic WinUSB driver for the HID device? I tried selecting Update Drivers and went to window where I can pick from list of drivers and selected "Have Disk" and then I search for winusb driver in System32 > DriverStore > FileRepository > winusb.inf_amd64_144aebaa418437c6. But when I select it to install it it gives me this error: "The folder you specified doesn't contain a compatible software driver for your device. If the folder contains a driver, make sure it is designed to work with Windows for x64-based systems." Appreciate the help!  

Vincent Scheib

unread,
Jul 8, 2019, 5:20:00 PM7/8/19
to Cristian Garneata, Reilly Grant, DeviceDev, Chromium-dev
May I suggest moving this to https://stackoverflow.com/questions/tagged/webusb so others will benefit?

Reilly Grant

unread,
Jul 9, 2019, 3:58:45 PM7/9/19
to Vincent Scheib, Cristian Garneata, DeviceDev, Chromium-dev
I recommend just waiting for WebHID to be available for preview in the next upcoming Chrome releases. Otherwise you will continue to fight with the operating system over the device.

Reilly Grant | Software Engineer | rei...@chromium.org | Google Chrome

Cristian Garneata

unread,
Jul 9, 2019, 4:06:23 PM7/9/19
to Reilly Grant, Vincent Scheib, DeviceDev, Chromium-dev
Thanks Reilly! Yeah, I decided to just wait it out. Our company can wait and we can just read the weight off the scale and type it manually in for now.
Reply all
Reply to author
Forward
0 new messages