-
Notifications
You must be signed in to change notification settings - Fork 35
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
Failed to send the report only during hot-plugged event, Duplicate of issue #65 #111
Comments
Is anything logged in chrome://device-log or the developer console? I agree this is strange. I don't think this is an implementation bug, this seems like a device error. If it were related to Chrome's permission model then it should have failed to open the device, but based on your description it sounds like open succeeded but sendReport failed. |
@nondebug HI matt, I found that my problem is essentially a duplicate of this issue reported two years ago, #65, since on Windows it seems not possible to wait for all topl level collections to be enumerated before firing the connect event, is there any update on the implementation of the 'devicechange' event you mentioned as sort of workaround in the issue |
I have been tested my device which is a headset connector with WebHID for a few days, I encountered a strange behaviour where I can not send the report using the device object received on the hot-plugged event, it throwed a DOMException with permisson not allowed. I tried a few workaround and found that if I set a 3 seconds delay then acquired the device, the output report can be successfully sent to device. Could it be the device is not actually ready for operation when the connect event fired like a race condition for re-granting permisson ? I assume the WebHID internally maintained a list of granted device, so the device object received on the connect callback argument is essentially the same object as the result returned from the
navigator.hid.getDevices()
, but it's strange I need to set a delay to get the device before can start doing operation, Below is code i used to showcase the situations mentioned above, thanks in advanceThe text was updated successfully, but these errors were encountered: