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

fix: Page.waitForDevicePrompt crash #11153

Merged
merged 1 commit into from Oct 15, 2023
Merged

fix: Page.waitForDevicePrompt crash #11153

merged 1 commit into from Oct 15, 2023

Conversation

thiagowfx
Copy link
Contributor

Only call deviceRequestPromptManager() if the parent frame is not null.

Bug: #11072
Follow-up-of: #9299

@thiagowfx
Copy link
Contributor Author

thiagowfx commented Oct 13, 2023

I'm not sure if this fix is correct though. @mzgoddard @outofambit thoughts?

I verified the crash doesn't happen anymore:

#!/usr/bin/env node
import puppeteer from 'puppeteer';

(async () => {
  const browser = await puppeteer.launch({
    devtools: true,
    headless: false,
    args: ['--enable-features=WebBluetoothNewPermissionsBackend'],
  });
  const mainPage = await browser.newPage();
  await mainPage.goto(
    'http://googlechrome.github.io/samples/web-bluetooth/get-devices-async-await.html'
  );
  await mainPage.waitForNetworkIdle();
  await mainPage.waitForDevicePrompt();
})();

@thiagowfx
Copy link
Contributor Author

thiagowfx commented Oct 13, 2023

Note that the --args only works with this patch: #11152

Copy link
Collaborator

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Can we find a way to test it e2e on GitHub actions?

@thiagowfx
Copy link
Contributor Author

thiagowfx commented Oct 13, 2023

I confirm the unit tests did not change. I'll see if there's a way to E2E.

@thiagowfx thiagowfx changed the base branch from main to thiagowfx/features October 13, 2023 16:07
@thiagowfx
Copy link
Contributor Author

thiagowfx commented Oct 13, 2023

Tentative E2E: #11159

Base automatically changed from thiagowfx/features to main October 15, 2023 14:11
Only call `deviceRequestPromptManager()` if the parent frame is not
null.

Bug: #11072
Follow-up-of: #9299
@thiagowfx thiagowfx enabled auto-merge (squash) October 15, 2023 14:18
@thiagowfx thiagowfx merged commit 257be15 into main Oct 15, 2023
52 checks passed
@thiagowfx thiagowfx deleted the thiagowfx/device-prompt branch October 15, 2023 14:32
@release-please release-please bot mentioned this pull request Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants