Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

启动时报错 Failed to launch the browser process #66

Open
Nigel-NI opened this issue Sep 6, 2021 · 2 comments
Open

启动时报错 Failed to launch the browser process #66

Nigel-NI opened this issue Sep 6, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@Nigel-NI
Copy link

Nigel-NI commented Sep 6, 2021

启动bot时提示以下错误信息:

(node:24354) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

    at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
    at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
    at Interface.emit (events.js:387:35)
    at Interface.close (readline.js:451:8)
    at Socket.onend (readline.js:224:10)
    at Socket.emit (events.js:387:35)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:24354) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:24354) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

在执行指令是也出现了报错:日志如下(以指令“十连”为例):

0|bot  | ReferenceError: browser is not defined
0|bot  |     at render (/root/Adachi-BOT/src/utils/render.js:4:16)
0|bot  |     at Object.module.exports [as gacha] (/root/Adachi-BOT/src/plugins/gacha/index.js:57:11)
0|bot  |     at processTicksAndRejections (internal/process/task_queues.js:95:5)

在进行npm install 时并未见到failed字眼,chromium可以正常下载。想知道该如何解决上述问题,期待得到开发大大的解答,谢谢!

@Arondight
Copy link
Owner

error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory

你需要自行解决这个依赖问题,或者参考README.md使用系统自带的Chromium来让包管理器为你解决所有的依赖问题。

@Arondight Arondight added the documentation Improvements or additions to documentation label Sep 6, 2021
@Nigel-NI
Copy link
Author

Nigel-NI commented Sep 6, 2021

感谢回复,问题已解决。我使用apt install libgbm1安装了有关软件包后就能正常启动了

@Arondight Arondight changed the title 启动bot时提示 Failed to launch the browser process,发送指令无响应 启动时抱错 Failed to launch the browser process Sep 6, 2021
@Nigel-NI Nigel-NI changed the title 启动时抱错 Failed to launch the browser process 启动时报错 Failed to launch the browser process Sep 6, 2021
mark9804 added a commit that referenced this issue Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants