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

[Question] Chromium: browserContext.close hanging after failed download #5273

Closed
15alja opened this issue Feb 3, 2021 · 1 comment
Closed
Assignees

Comments

@15alja
Copy link

15alja commented Feb 3, 2021

In one of my tests, I am expecting a download and asserting on the suggested file name. Recently, the downloads executed within Playwright/Chromium are resulting in a "Bad Certificate" error. I can live with this since I am asserting on the suggested file name, not the path it is saved to, and that is available regardless of the error. The download works fine with Google Chrome outside of Playwright.

However, whenever this "Bad Certificate" error appears, it seems that browserContext.close hangs indefinitely. I could just use browser.close which does not hang, but does save the HAR file.

Two questions:

  • Any ideas on what could cause the "Bad Certificate" error? For reference, I am using Playwright 1.8.0, but I know it has worked on this version before. If anything, how can I further debug what causes this issue?
  • Why does the download failure cause a hang in browserContext.close?

Thanks!

Update: I tried running the test with Firefox and there are no issues.
Update 2: As a workaround, I am using promise race to timeout in case it hangs.

@15alja 15alja changed the title [Question] browserContext.close hanging after failed download [Question] Chromium: browserContext.close hanging after failed download Feb 3, 2021
@dgozman dgozman self-assigned this Feb 4, 2021
@dgozman
Copy link
Contributor

dgozman commented Feb 15, 2021

Any ideas on what could cause the "Bad Certificate" error? For reference, I am using Playwright 1.8.0, but I know it has worked on this version before. If anything, how can I further debug what causes this issue?

We need more information to help here. Could you please provide a repro script, or a page url? For you own debugging, try running with headless: false option and look at Developer Tools Network Panel.

Why does the download failure cause a hang in browserContext.close?

That's a bug, should be fixed in the next version with #5424.

@dgozman dgozman closed this as completed Feb 15, 2021
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

2 participants