gpt4free-ts icon indicating copy to clipboard operation
gpt4free-ts copied to clipboard

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

Open maxage opened this issue 1 year ago • 5 comments

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://10.0.0.10:1080 - rapid_api_key=4912c29cecmsh20ef05f89de857ep1c6458jsn4b65bXXXXXX - DEBUG=1`

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

maxage avatar May 14 '23 00:05 maxage