You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
15alja
changed the title
[Question] browserContext.close hanging after failed download
[Question] Chromium: browserContext.close hanging after failed download
Feb 3, 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.
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 usebrowser.close
which does not hang, but does save the HAR file.Two questions:
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.
The text was updated successfully, but these errors were encountered: