'playwright firefox.launchPersistentContext timeout
I want to open a context using playwright firefox based on an session dir, on my pc, it work perfectly, but on 3 diffrent remote desktop connection pc (vps windows server) there are an error. The browser is open after 30s it say the error :
browserType.launchPersistentContext: Timeout 30000ms exceeded.
=========================== logs ===========================
<launching> C:\Users\Administrator\AppData\Local\ms-playwright\firefox-1322\firefox\firefox.exe -no-remote -wait-for-browser -foreground -profile ./browser_data/thread-test -juggler-pipe about:blank
<launched> pid=924
[pid=924][out]
[pid=924][out] Juggler listening to the pipe
[pid=924][err] IPDL protocol Error: Received an invalid file descriptor
[pid=924][err] IPDL protocol Error: Received an invalid file descriptor
[pid=924][err] IPDL protocol Error: Received an invalid file descriptor
============================================================
at async C:\Users\Administrator\Desktop\gen\index.js:128:23 {
name: 'TimeoutError'
}
The code that I use :
const {firefox} = require('playwright')
const context = await firefox.launchPersistentContext('./browser_data/thread-test', {headless:false,});
I think there is an error on connect browser to playwright step but I don't know how to fix...
Thank you for your help !
Solution 1:[1]
import { rm } from 'fs';
import { firefox } from 'playwright';
rm('/context/sessionstore-backups', () => {});
rm('/context/sessionCheckpoints.json', () => {});
rm('/context/sessionstore.jsonlz4', () => {});
context = await firefox.launchPersistentContext(
'/context',
{ headless: false }
);
page = context.pages()[0];
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | DisNiki |
