-
Notifications
You must be signed in to change notification settings - Fork 9k
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
[Feature]: Cannot grant access to WebUSB device, "Connect" dialog cannot be managed #8813
Comments
The dialog is for JS alert/confirm dialogs etc. I think WebUSB is using a different mechanism that is more similar to permissions than to JS-driven dialogs. Have you tried to override the dialog using browser permission overrides https://pptr.dev/api/puppeteer.browsercontext.overridepermissions? if that does not work, I think it's a feature request. |
no, but i'll give that a shot and share my findings here. i haven't used that API before though so i'm not sure what value(s) to try. any tips there would be much appreciated. is it at all related to |
ok, using the following routine: async function launchBrowser(url, permissions){
const browser = await puppeteer.launch({ headless: false, slowMo: 1000 });
const context = browser.defaultBrowserContext();
await context.overridePermissions(url, permissions);
const page = await browser.newPage();
await page.goto(url);
return { browser, page };
} ....with
these values fail in the same way as well: so, i'm a bit stumped on what the correct permission key should be (or even if there is one at all) 🤷♂️ fwiw, i also found my way to: |
@busticated thanks for the investigation! As I am not really sure if this can be solved via permissions, I assume the support for handling this dialog is missing from CDP. |
@OrKoN ah, makes sense. thanks for filing that. i starred it and will follow along 🙏👍 |
Bug description
Steps to reproduce the problem:
Launch a browser:
Navigate to a url w/ WebUSB functionality:
Listen for "Connect" dialog and accept device:
Request a device:
Dialog launches but i'm not able to programmatically interact with it to select and approve my device.
Puppeteer version
16.1.1
Node.js version
16.16.0
npm version
8.11.0
What operating system are you seeing the problem on?
macOS
Relevant log output
No response
The text was updated successfully, but these errors were encountered: