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

浏览器启动失败,没有可用沙盒 #32

Open
maxage opened this issue May 14, 2023 · 5 comments
Open

浏览器启动失败,没有可用沙盒 #32

maxage opened this issue May 14, 2023 · 5 comments

Comments

@maxage
Copy link

maxage commented May 14, 2023

DEBUG=1 的错误提示如下:
Error: Failed to launch the browser process! [33:33:0514/000848.532379:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. [0514/000848.536864:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2) [0514/000848.536907:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2) TROUBLESHOOTING: https://pptr.dev/troubleshooting at ChildProcess.onClose (/usr/src/app/node_modules/@puppeteer/browsers/src/launch.ts:398:11) at ChildProcess.emit (node:events:525:35) at ChildProcess.emit (node:domain:489:12) at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

DEBUG=0 的错误提示如下:
`> [email protected] start

ts-node index.ts
browser pool init size:1
Puppeteer old Headless deprecation warning:
In the near feature headless: true will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing headless: "new" to puppeteer.launch()
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
Error: Failed to launch the browser process!
[0514/001635.232990:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at Interface.onClose (/usr/src/app/node_modules/@puppeteer/browsers/src/launch.ts:398:11)
at Interface.emit (node:events:525:35)
at Interface.emit (node:domain:489:12)
at Interface.close (node:internal/readline/interface:533:10)
at Socket.onend (node:internal/readline/interface:259:10)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)`

`version: "3.9"

services:
gpt4free-ts:
image: xiangsx/gpt4free-ts:latest
container_name: gpt4free-ts
ports:
- "3030:3000"
restart: always
cap_add:
- "SYS_ADMIN"
environment:
- http_proxy=http:https://10.0.0.10:1080
- rapid_api_key=4912c29cecmsh20ef05f89de857ep1c6458jsn4b65bXXXXXX
- DEBUG=1`

其中http:https://10.0.0.10:1080这个是能够正常访问外网的代理。
镜像是拉取的docker pull xiangsx/gpt4free-ts:latest

@xiangsx
Copy link
Owner

xiangsx commented May 14, 2023

try docker image v0.0.6

@maxage
Copy link
Author

maxage commented May 14, 2023

_gpt4free-ts_logs.txt
我拉取了xiangsx/gpt4free-ts:v0.0.6镜像,但是还是报错相同的问题。

`
[email protected] start
ts-node index.ts

browser pool init size:1
Puppeteer old Headless deprecation warning:
In the near feature headless: true will default to the new Headless mode
for Chrome instead of the old Headless implementation. For more
information, please see https://developer.chrome.com/articles/new-headless/.
Consider opting in early by passing headless: "new" to puppeteer.launch()
If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.

Error: Failed to launch the browser process!
[0514/052904.591339:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

TROUBLESHOOTING: https://pptr.dev/troubleshooting
at Interface.onClose (/usr/src/app/node_modules/@puppeteer/browsers/src/launch.ts:398:11)
at Interface.emit (node:events:525:35)
at Interface.emit (node:domain:489:12)
at Interface.close (node:internal/readline/interface:533:10)
at Socket.onend (node:internal/readline/interface:259:10)
at Socket.emit (node:events:525:35)
at Socket.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
`

@DNLINYJ
Copy link
Contributor

DNLINYJ commented May 15, 2023

git clone后docker-compose up --build可以运行 目前只加了amd64位的chrome安装 有需要可以自己在dockerfile里面改

1 similar comment
@IdaBruce
Copy link

git clone后docker-compose up --build可以运行 目前只加了amd64位的chrome安装 有需要可以自己在dockerfile里面改

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

5 participants
@xiangsx @maxage @DNLINYJ @IdaBruce and others