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不支持nas的linux #405

Open
Ventsze opened this issue Mar 7, 2023 · 16 comments
Open

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

Ventsze opened this issue Mar 7, 2023 · 16 comments
Labels
question Further information is requested

Comments

@Ventsze
Copy link

Ventsze commented Mar 7, 2023

确认

  • 我的Bot版本已更新到最新,且已尝试使用poetry install更新依赖库
  • 我已查阅文档-常见问题,无相关解决方案
  • 我已确认issue中没有类似的问题或仍然得不到解决

环境信息

  • 系统版本: Windows10
  • Python版本: 3.8.12

问题描述

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: version GLIBC_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 找不到,不知道怎么处理了,希望有时间麻烦看看,

@Ventsze Ventsze added the question Further information is requested label Mar 7, 2023
@CMHopeSunshine
Copy link
Owner

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

@CMHopeSunshine
Copy link
Owner

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

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

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

@CMHopeSunshine CMHopeSunshine changed the title [问题]标题启动报错,用的nas 基于linux [问题]Playwright不支持nas的linux Mar 7, 2023
@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

群辉nas.

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

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

@CMHopeSunshine
Copy link
Owner

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

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

好,谢谢

@CMHopeSunshine
Copy link
Owner

LittlePaimon里面

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

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
Copy link
Author

Ventsze commented Mar 7, 2023

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

@CMHopeSunshine
Copy link
Owner

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

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

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

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

连路由器上面的

@CMHopeSunshine
Copy link
Owner

那就换成你的内网ip

@Ventsze
Copy link
Author

Ventsze commented Mar 7, 2023

好了,犯傻了,谢谢

@shoucandanghehe
Copy link

为啥不用docker呢🤔

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

No branches or pull requests

3 participants