rrvideo
rrvideo copied to clipboard
能否增加个命令行参数,让chromium在无沙箱模式下运行?
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#setting-up-chrome-linux-sandbox
因为是在Docker里全局安装的(用root跑的),所以得在root用户下运行,能够无沙箱运行就不会报错了。
const browser = await puppeteer.launch({
args: ['--no-sandbox', '--disable-setuid-sandbox'],
});
问题: 在ubuntu上部署rrvideo生成mp4时报错
Error: Failed to launch the browser process! [0402/002144.257527:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
解决方案: rrvideo 本地打包,在index.ts
this.browser = await puppeteer.launch({ headless: this.config.headless, args: ['--no-sandbox', '--disable-setuid-sandbox'], }) 增加args配置
使用 build 下 cli.js.和index.js.