thegecko / webusb

Node.js implementation of the WebUSB Specification
https://thegecko.github.io/webusb/
MIT License
183 stars 27 forks source link

Resolve all device.getStringDescriptor() errors to empty string #45

Closed sandeepmistry closed 5 years ago

sandeepmistry commented 5 years ago

I'm using a somewhat flaky USB device, that gets various errors when getting string descriptors, and these errors cause usb.requestDevice(options) to not report the device - however using WebUSB in a browser reports the device.

I think the intention of adapter's getStringDescriptor was to map all errors to an empty string result, based on the catch code.