xiangsx / gpt4free-ts

Providing a free OpenAI GPT-4 API ! This is a replication project for the typescript version of xtekky/gpt4free
GNU General Public License v3.0
7.65k stars 1.34k forks source link

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

Open maxage opened 1 year ago

maxage commented 1 year ago

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 的错误提示如下: `> gpt4free-ts@0.0.1 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:

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

xiangsx commented 1 year ago

try docker image v0.0.6

maxage commented 1 year ago

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

` gpt4free-ts@0.0.1 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 commented 1 year ago

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

IdaBruce commented 1 year ago

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