Skip to content
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

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

Open
RushikeshPatange opened this issue Jun 12, 2024 · 4 comments

Comments

@RushikeshPatange
Copy link

RushikeshPatange commented Jun 12, 2024

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

  • Operating System: Sonoma 14.5
  • Browser: Chrome Version 126.0.6478.57 (Official Build) (arm64)
  • Device: ESP32-H2-MINI-1 ( used USB port for connection)

Attachments

Please find the attached video

web-serial-polyfill-device-not-connecting.mov

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

@reillyeon
Copy link
Collaborator

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
Copy link
Author

RushikeshPatange commented Jun 14, 2024

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
Copy link
Collaborator

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.

@buckett
Copy link

buckett commented Nov 4, 2024

I'm also seeing this issue (with the same error in the device-log). I had previously opened the serial terminal with the native web serial implementation and this was working fine. Closing Chrome and then navigating to the polyfill implementation of the Web Serial still resulted in the same error (so it doesn't seem to be Chrome holding the USB device?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants