Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【错误回报】playwright 不支持 Ubuntu 以外的 Linux 发行版 #138

Closed
ECIAP opened this issue Mar 15, 2022 · 5 comments
Closed

Comments

@ECIAP
Copy link

ECIAP commented Mar 15, 2022

运行环境

CentOS7.9

HarukaBot 版本

1.3.5.post3

go-cqhttp 版本

1.0.0-rc1

错误描述

===错误描述===
使用 hb run 运行1.3.5.post3版本的 harukabot
由于缺少 playwright 依赖将自动退出,而 playwright 的官方版本并不支持 Ubuntu 18.04 和 Ubuntu 20.04 以外的其他 Linux 发行版
这导致 harukabot 无法运行在其他环境

===如何复现===
任意 Centos7.x 系统均复现

===期望===
在 Centos7.x 上移除 Chromium / 以其他方式安装依赖

报错日志(如果有)

03-15 16:57:29 [INFO] haruka_bot | 正在检查 Chromium 更新
03-15 16:57:30 [INFO] haruka_bot | 检查 Playwright 依赖,不完整将自动退出
03-15 16:57:30 [ERROR] uvicorn | Traceback (most recent call last):
File "/usr/local/python3/lib/python3.8/site-packages/starlette/routing.py", line 621, in lifespan
async with self.lifespan_context(app):
File "/usr/local/python3/lib/python3.8/site-packages/starlette/routing.py", line 518, in aenter
await self._router.startup()
File "/usr/local/python3/lib/python3.8/site-packages/starlette/routing.py", line 598, in startup
await handler()
File "/usr/local/python3/lib/python3.8/site-packages/haruka_bot/utils/browser.py", line 86, in check_playwright_dependencies
await init()
File "/usr/local/python3/lib/python3.8/site-packages/haruka_bot/utils/browser.py", line 19, in init
_browser = await browser.chromium.launch(**kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/playwright/async_api/_generated.py", line 11674, in launch
await self._async(
File "/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_browser_type.py", line 90, in launch
Browser, from_channel(await self._channel.send("launch", params))
File "/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 39, in send
return await self.inner_send(method, params, False)
File "/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 63, in inner_send
result = next(iter(done)).result()
playwright._impl._api_types.Error:
╔════════════════════════════════════════════════════════════╗
║ Host system is missing a few dependencies to run browsers. ║
║ Please install them with the following command: ║
║ ║
║ playwright install-deps ║
║ ║
║ <3 Playwright Team ║
╚════════════════════════════════════════════════════════════╝

03-15 16:57:30 [ERROR] uvicorn | Application startup failed. Exiting.

@wosiwq
Copy link
Collaborator

wosiwq commented Mar 15, 2022

非haruka问题,建议给playwright提交相应的issue

@wosiwq wosiwq pinned this issue Mar 15, 2022
@wosiwq wosiwq unpinned this issue Mar 15, 2022
@wosiwq
Copy link
Collaborator

wosiwq commented Mar 15, 2022

#137 (comment)
若想尝试自己解决可以看这个comment,但playwright依赖问题并非是本项目本身的问题,不应寄希望于所有依赖playwright的项目都为了centos更换依赖

@ECIAP
Copy link
Author

ECIAP commented Mar 16, 2022

非haruka问题,建议给playwright提交相应的issue

Thanks for reply.

已向 Playwright 提交对 CentOS 支持的 issue,
没有尝试此 #137 (comment) 所以选择了将 HarukaBot 降级至 1.2.0a2(没那么多截图要求,能用就行23333)

请求 wiki 补充老版本的反向ws地址,当前 wiki 的最新 ws 地址路径不对
旧版本应该是 cqhttp/ws
Solved.

@ECIAP ECIAP closed this as completed Mar 16, 2022
@ECIAP
Copy link
Author

ECIAP commented Mar 16, 2022

可能有用的 Playwright on CentOS
microsoft/playwright#5780 (comment)

@wosiwq
Copy link
Collaborator

wosiwq commented Mar 17, 2022

非haruka问题,建议给playwright提交相应的issue

Thanks for reply.

已向 Playwright 提交对 CentOS 支持的 issue, 没有尝试此 #137 (comment) 所以选择了将 HarukaBot 降级至 1.2.0a2(没那么多截图要求,能用就行23333)

请求 wiki 补充老版本的反向ws地址,当前 wiki 的最新 ws 地址路径不对 旧版本应该是 cqhttp/ws Solved.

emmmm,本质上hb是不提倡使用旧版本的,因为新版都是验证过的可用的,修复了bug的stable版本,无法保证早古版本的可用性与稳定性,所以在wiki上大概率是不会添加旧版本相关的信息的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants