CMHopeSunshine / LittlePaimon

小派蒙!基于Nonebot2的原神机器人,包括但不限于UID面板查询、抽卡记录分析、游戏攻略图鉴、实时便签、原石札记、群聊学习、群管等功能。/ LittlePamon! Genshin Impact multifunctional bot based on Nonebot2.
https://docs.paimon.cherishmoon.top
GNU Affero General Public License v3.0
1.15k stars 129 forks source link

[问题]Playwright不支持nas的linux #405

Open Ventsze opened 1 year ago

Ventsze commented 1 year ago

确认

环境信息

问题描述

nb paimon run 运行报错 卡在正在安装依赖这里

问题截图

03-07 15:43:23 [INFO] LittlePaimon | [资源检查]开始检查资源 03-07 15:43:24 [INFO] LittlePaimon | [资源检查]资源完好,无需下载 03-07 15:43:24 [INFO] LittlePaimon | [Playwright]正在安装 chromium 03-07 15:43:24 [INFO] LittlePaimon | [Playwright]正在安装依赖 /usr/lib/python3.8/site-packages/playwright/driver/node: /lib64/libm.so.6: version GLIBC_2.27' not found (required by /usr/lib/python3.8/site-packages/playwright/driver/node) /usr/lib/python3.8/site-packages/playwright/driver/node: /lib64/libc.so.6: versionGLIBC_2.28' not found (required by /usr/lib/python3.8/site-packages/playwright/driver/node) BEWARE: your OS is not officially supported by Playwright; downloading fallback build. BEWARE: your OS is not officially supported by Playwright; downloading fallback build. 03-07 15:43:25 [ERROR] uvicorn | Traceback (most recent call last): File "/volume1/docker/genshin/LittlePaimon/LittlePaimon/utils/brower.py", line 19, in init _browser = await launch_browser(kwargs) File "/volume1/docker/genshin/LittlePaimon/LittlePaimon/utils/brower.py", line 30, in launch_browser return await _playwright.chromium.launch(kwargs) File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/async_api/_generated.py", line 14007, in launch await self._impl_obj.launch( File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_browser_type.py", line 93, in launch Browser, from_channel(await self._channel.send("launch", params)) File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 44, in send return await self._connection.wrap_api_call( File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 419, in wrap_api_call return await cb() File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 79, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: Browser closed. ==================== Browser output: ====================

/root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-jl581i --remote-debugging-pipe --no-startup-window pid=30863 [pid=30863][err] /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory [pid=30863] [pid=30863] starting temporary directories cleanup =========================== logs =========================== /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-jl581i --remote-debugging-pipe --no-startup-window pid=30863 [pid=30863][err] /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory [pid=30863] [pid=30863] starting temporary directories cleanup ============================================================ During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/starlette/routing.py", line 671, in lifespan async with self.lifespan_context(app): File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/starlette/routing.py", line 566, in __aenter__ await self._router.startup() File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/starlette/routing.py", line 648, in startup await handler() File "/volume1/docker/genshin/LittlePaimon/LittlePaimon/utils/brower.py", line 53, in start_browser await get_browser(**kwargs) File "/volume1/docker/genshin/LittlePaimon/LittlePaimon/utils/brower.py", line 34, in get_browser return _browser or await init(**kwargs) File "/volume1/docker/genshin/LittlePaimon/LittlePaimon/utils/brower.py", line 24, in init _browser = await launch_browser(**kwargs) File "/volume1/docker/genshin/LittlePaimon/LittlePaimon/utils/brower.py", line 30, in launch_browser return await _playwright.chromium.launch(**kwargs) File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/async_api/_generated.py", line 14007, in launch await self._impl_obj.launch( File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_browser_type.py", line 93, in launch Browser, from_channel(await self._channel.send("launch", params)) File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 44, in send return await self._connection.wrap_api_call( File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 419, in wrap_api_call return await cb() File "/volume1/docker/genshin/LittlePaimon/.venv/lib/python3.8/site-packages/playwright/_impl/_connection.py", line 79, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: Browser closed. ==================== Browser output: ==================== /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-Xnps3T --remote-debugging-pipe --no-startup-window pid=30897 [pid=30897][err] /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory [pid=30897] [pid=30897] starting temporary directories cleanup =========================== logs =========================== /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-Xnps3T --remote-debugging-pipe --no-startup-window pid=30897 [pid=30897][err] /root/.cache/ms-playwright/chromium-1041/chrome-linux/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory [pid=30897] [pid=30897] starting temporary directories cleanup ============================================================ 03-07 15:43:25 [ERROR] uvicorn | Application startup failed. Exiting. 弄了3个小时,在网上找了各种办法都没解决,如果运行nb paimon run playwright install chromium --with-deps 不直接运行run,又会出现get-apt 找不到,不知道怎么处理了,希望有时间麻烦看看,
CMHopeSunshine commented 1 year ago

非主流linux,系统不完整,缺库

CMHopeSunshine commented 1 year ago

BEWARE: your OS is not officially supported by Playwright; downloading fallback build. 你的操作系统没有被Playwright官方支持

Ventsze commented 1 year ago

大佬,那有办法解决吗,我用的nas跑的,因为nas24小时在线...

Ventsze commented 1 year ago

群辉nas.

Ventsze commented 1 year ago

如果不行我就不折腾了,谢谢

CMHopeSunshine commented 1 year ago

恕我没用过nas,如果网上找不到解决方法的话,我也不会。 不过可以试试删除需要用到playwright的插件:把bot目录/LittlePaimon/utils/broswer.py文件删掉,删掉后会有些报错类似说can not import xxx from LittlePaimon.utils.broswer的,忽略即可

Ventsze commented 1 year ago

好,谢谢

CMHopeSunshine commented 1 year ago

LittlePaimon里面

Ventsze commented 1 year ago

03-07 16:00:16 [INFO] uvicorn | Application startup complete. 03-07 16:00:16 [INFO] uvicorn | Uvicorn running on http://0.0.0.0:13579 (Press CTRL+C to quit) 这个 已经成功启动了,但是ip访问不了

Ventsze commented 1 year ago

http://127.0.0.1:13579/go-cqhttp 这个ip访问不了 防火墙也关了访问不了

CMHopeSunshine commented 1 year ago

把127.0.0.1换成你的公网ip啊,127.0.0.1是本地,只能在本地内访问

Ventsze commented 1 year ago

我nas是内网 没有公网 内网访问不了

Ventsze commented 1 year ago

连路由器上面的

CMHopeSunshine commented 1 year ago

那就换成你的内网ip

Ventsze commented 1 year ago

好了,犯傻了,谢谢

shoucandanghehe commented 1 year ago

为啥不用docker呢🤔