I need to connect the device to the browser using the webUSB, after the connection I call the open method and this error falls "Uncaught (in promise) DOMException: Access denied.". How to fix it?
ngOnInit(): void {
const button = document.getElementById('connectButton');
button.addEventListener('click', async () => {
let device;
try {
device = await navigator.usb.requestDevice({ filters: []});
} catch (err) {
}
device.open()
.then(() => device.selectConfiguration(1))
.then(() => device.claimInterface(device.configuration.interfaces[0].interfaceNumber));
});
}