剧作家firefox.launchpersistentContext超时

发布于 2025-01-30 00:55:15 字数 1273 浏览 2 评论 0原文

我想使用基于会话dir的playwright Firefox在我的PC上打开上下文,它可以很好地工作,但是在3个不同的远程桌面连接PC(VPS Windows Server)上,有错误。浏览器在30年代后打开,说明错误:

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'
}

错误image

我使用的代码:

const {firefox} = require('playwright')
const context = await firefox.launchPersistentContext('./browser_data/thread-test', {headless:false,});

i认为连接浏览器上的错误是剧作家步骤,但我不知道该如何解决...

谢谢您的帮助!

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'
}

error image

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 !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

焚却相思 2025-02-06 00:55:15
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];
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];
夜巴黎 2025-02-06 00:55:15

非常重要地,我们需要在userDatadaDir文件夹中删除sessionstore-backups sessionstore.jsonlz4

Acctually, we need to remove sessionstore-backups and sessionstore.jsonlz4 in the userDataDir folder

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文