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

'claimInterface' on 'USBDevice': The requested interface implements a protected class. #23657

Closed
itzmeKaali opened this issue Jul 4, 2024 · 3 comments
Labels
invalid Invalid issues or pull requests (wrong repo, spam, duplicates, etc.). This won't get merged. Sorry!

Comments

@itzmeKaali
Copy link

What type of issue is this?

Other

What information was incorrect, unhelpful, or incomplete?

const device = await navigator.usb.requestDevice({
filters: [{ vendorId: 0x072f, productId: 0x2200 }]
});

    console.log('Device:', device);
    await device.open();
    await device.selectConfiguration(1);
    await device.claimInterface(0);
    
    
    This script returns "Error requesting USB device: DOMException: Failed to execute 'claimInterface' on 'USBDevice': The requested interface implements a protected class." I'm trying to claim data from the SMARTCARD 

What browsers does this problem apply to, if applicable?

Chromium (Chrome, Edge 79+, Opera, Samsung Internet)

What did you expect to see?

I want to collect the data of the NFC card on the reader

Did you test this? If so, how?

Yes but the same issue

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No response

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/USBDevice/claimInterface

MDN metadata

MDN page report details
  • Query: api.USBDevice.claimInterface
  • Report started: 2024-07-04T12:54:01.542Z
@queengooborg
Copy link
Contributor

This sounds like you're requesting development assistance more than reporting a browser issue. A quick internet search reveals a StackOverflow thread about WebUSB and Smart Card readers: https://stackoverflow.com/questions/66420229/webusb-api-and-pc-sc-smart-card-readers

@queengooborg queengooborg closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2024
@queengooborg queengooborg added the invalid Invalid issues or pull requests (wrong repo, spam, duplicates, etc.). This won't get merged. Sorry! label Jul 4, 2024
@itzmeKaali
Copy link
Author

hi this is not helping me

@queengooborg
Copy link
Contributor

I'm sorry if that thread is unhelpful, but I'm afraid this repository is not for development assistance. This repository is only about browser compatibility and bugs, and your browser is behaving as per the specification (see https://wicg.github.io/webusb/#dom-usbinterface-isprotectedclass-slot for reference). If you need development assistance, I highly recommend searching around or asking on StackOverflow, a dedicated help forum for coding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Invalid issues or pull requests (wrong repo, spam, duplicates, etc.). This won't get merged. Sorry!
Projects
None yet
Development

No branches or pull requests

2 participants