Closed kayleewright-bluescape closed 2 years ago
I can reproduce it locally on macOS 12.2.1
const playwright = require('playwright');
(async () => {
for(let i = 0; i < 2; i++) {
const context = await playwright.firefox.launchPersistentContext('./foo', {
headless: false,
});
await context.close();
}
})();
I can repro.
I get the same timeout issue (I can reproduce it). I also notice that the if I open a new Tab on the browser window that get lunch it then works. So it's seems that its stuck in something. The issue seems to happen only in Headless = False.
I deleted the session files and it worked.
const playwright = require('playwright');
const fs = require('fs').promises;
(async () => {
for(let i = 0; i < 2; i++) {
const context = await playwright.firefox.launchPersistentContext('./foo', {
headless: false,
});
await context.close();
await Promise.all([
fs.rm('./foo/sessionstore-backups', { recursive: true, force: true }),
fs.rm('./foo/sessionCheckpoints.json', { recursive: true, force: true }),
fs.rm('./foo/sessionstore.jsonlz4', { recursive: true, force: true }),
]);
}
})();
The issue's title should likely be changed at least to no longer say it's "on Mac" as the issue seems cross-platform; a committer to this repo/a member of Microsoft closed and folded the similar Windows issue https://github.com/microsoft/playwright-dotnet/issues/2070 into this one. Thanks.
For the record:
about:newtab
. This is a privileged about
scheme, so firefox enforces fission on it.about:blank
as a part of default profile startup, it causes a process swap that we don't support yet.This should be fixed with fission refactoring.
I still see this error on windows
ERR browserType.launchPersistentContext: Timeout 30000ms exceeded.
=========================== logs ===========================
<launching> C:\Users\user\AppData\Local\ms-playwright\firefox-1323\firefox\firefox.exe -no-remote -wait-for-browser -foreground -profile ./chrome_cache -juggler-pipe about:blank
<launched> pid=13340
[pid=13340][out]
[pid=13340][out] Juggler listening to the pipe
This is fixed for the 1.24 release.
Playwright versions tested: 1.19.2, 1.18 OS: MacOS 11.6 Browser affected: firefox
Can reproduce this even while working in the node interpreter as well as a simple JS script. Note that I have also tested this on my windows 10 machine and it works fine there. Chromium on mac also works fine.
The second time you launch the persistent context you will get a 30000ms timeout error. The browser does appear to be launched and fully working though.
Here are the protocol logs: