playwright: [BUG] launchPersistentContext hanging on "about:blank" [REOPENED]
Context:
- Playwright Version: 1.7.1
- Operating System: Mac
- Node.js version: v14.15.1
- Browser: Chromium
Code Snippet
const {chromium} = require('playwright');
(async () => {
const options = {
headless : false,
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1'
}
const browser = await chromium.launchPersistentContext(`udd1`, options)
var [page] = await browser.pages();
await page.goto("https://www.google.com/");
})();
Describe the bug
Sometimes the browser hangs on “about:blank”. I’ve tested and it seems that if I even console.log(browser), then it doesn’t even log it when this occurs… The only way to get past this is to refresh the page by using CMD + R on my keyboard. I’m unsure why this is happening as it doesn’t occur every time I run my code. It seems as if the browser isn’t even launching as it doesn’t log.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19
Commits related to this issue
- fix(chromium): fix race with Chromium lifecycle events We should subscribe to lifecycle events not later than we send the `Page.setLifecycleEventsEnabled` event. Currently, we subscribe to the lifec... — committed to aslushnikov/playwright by aslushnikov 3 years ago
- fix: work-around electron's broken event loop Since `setImmediate` doesn't create a new task in Electron, we have to fallback to `setTimeout` instead. See https://github.com/electron/electron/issues... — committed to aslushnikov/playwright by aslushnikov 3 years ago
- fix: work-around electron's broken event loop (#5867) Since `setImmediate` doesn't create a new task in Electron, we have to fallback to `setTimeout` instead. See https://github.com/electron/elec... — committed to microsoft/playwright by aslushnikov 3 years ago
@bb1234cp thank you the repro steps! I was able to debug this to a nasty race condition on our side. Sorry for this taking so long!