Sakuracio / zhenxun_bot_docker

使用docker快速部署zhenxun_bot
GNU Affero General Public License v3.0
17 stars 4 forks source link

playwright问题 #6

Open leihao opened 1 year ago

leihao commented 1 year ago

playwright._impl._api_types.Error: Executable doesn't exist at /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝ 03-14 10:32:25 [ERROR] uvicorn | Application startup failed. Exiting. 2023/03/14 10:32:25 exit status 3

旧配置在重新部署时似乎会遇到,在初始化阶段就异常退出了,是不是全新安装的时候是zhenxun_bot内部调用一次完成安装的 zx-cli我看不到,Dockerfile似乎都没有安装

Sakuracio commented 1 year ago

正常情况下,真寻在第一次启动时会自动安装playwright的依赖

leihao commented 1 year ago

确实也是真寻那边的问题,环境变化后无法检测到playwright未安装,就直接调用了. 不过docker这边缺乏正常的进入容器手工安装的手段,这个错误会导致真寻启动失败,容器直接会退出

Sakuracio commented 1 year ago

重新编译了包含playwright依赖的镜像 等半个小时后重新拉取最新版镜像即可 由于包含playwright的相关环境 镜像大小提升了300M左右 解决方法其实很多…

leihao commented 1 year ago

感谢感谢,我也是担心未来会有别人遇到所以来提issue的. 我是临时override掉CMD阻止zx-cli启动,然后自己手工bash进容器去安装搞定的

leihao commented 1 year ago

包含playwright这个方案更好! 我第一次启动HTML绘制图片的功能的时候,真寻卡死了半天,国内网络装playwright挺痛苦的

Sakuracio commented 1 year ago

确实,我本来想写两行代码让他自己装的 试了一下结果在我电脑上装了半个多小时 干脆打包进去了