google / web-serial-polyfill

Apache License 2.0
112 stars 29 forks source link

NetworkError: Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface. #60

Open RushikeshPatange opened 3 months ago

RushikeshPatange commented 3 months ago

Issue Description

I encountered an error while trying to connect the device using polyfill API on Google Chrome Lab Serial Terminal. The error message is as follows:

NetworkError: Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface.

Expected Behavior

Device should connect without any error

Actual Behavior

Getting described error

Environment

Attachments

Please find the attached video

https://github.com/google/web-serial-polyfill/assets/90703337/e487331d-3771-456d-bf61-dc35a09b91e4


Any help to resolve this issue would be greatly appreciated. Thank you!

reillyeon commented 3 months ago

Chrome can't claim an interface if the OS won't let it, such as if there is another driver or application that is already using it. You'll see a lower-level error in chrome://device-log.

RushikeshPatange commented 3 months ago

Chrome can't claim an interface if the OS won't let it, such as if there is another driver or application that is already using it. You'll see a lower-level error in chrome://device-log.

Hi @reillyeon,

Thank you for your response.

I checked chrome://device-log and found the following error log:

Device Log Error

Despite reviewing this, I'm still encountering the issue. Could you please provide further assistance on how to resolve this?

Thanks in advance !

reillyeon commented 3 months ago

This message confirms that macOS is not allowing Chrome to claim the interface. You may be able to resolve this by manually unloading a driver with kextunload, exiting whatever program is already using the interface, or using the Web Serial API (not the WebUSB-based polyfill) to connect to the device through the existing driver.