[Puppeteer] 通过linxu的docker container运行的时候报错Not found local chromium

在本地运行没问题,通过linux的docker container运行的时候报错:

[PCR] Chromium revision: 869685
[PCR] Not found local chromium

Monitoring: https://storage.googleapis.com
Time: 2022-05-08 05:08:48


Monitoring: https://npm.taobao.org/mirrors
Time: 2022-05-08 05:08:48

[PCR] Downloading from host: https://storage.googleapis.com ...
[PCR] Downloading from host: https://storage.googleapis.com ...
[PCR] Downloading from host: https://storage.googleapis.com ...
[PCR] Downloading from host: https://storage.googleapis.com ...
[PCR] Chromium downloaded to /root/.chromium-browser-snapshots
[PCR] Checking prevIoUs local chromium revisions ...
Error: Failed to launch the browser process!
/root/.chromium-browser-snapshots/linux-869685/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory


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

    at onClose (/ia-ui-automation/node_modules/horseshoe-cli-auto/node_modules/puppeteer-core/lib/cjs/puppeteer/node/browserRunner.js:194:20)
    at Interface.<anonymous> (/ia-ui-automation/node_modules/horseshoe-cli-auto/node_modules/puppeteer-core/lib/cjs/puppeteer/node/browserRunner.js:184:68)
    at Interface.emit (events.js:412:35)
    at Interface.close (readline.js:530:8)
    at Socket.onend (readline.js:254:10)
    at Socket.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processticksAndRejections (internal/process/task_queues.js:82:21)
[PCR] Chromium executablePath: /root/.chromium-browser-snapshots/linux-869685/chrome-linux/chrome
[PCR] Chromium launchable: false
[PCR] Puppeteer version: 9.1.1
[PCR] Stats saved: node_modules/horseshoe-cli-auto/node_modules/puppeteer-chromium-resolver/.stats.json
[worker2] [job 2] [puppeteer] success (cost 10,544ms)
[worker2] [job 2] [browser] launch ...
(node:45) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!

相关文章

这篇文章主要介绍“基于nodejs的ssh2怎么实现自动化部署”的...
本文小编为大家详细介绍“nodejs怎么实现目录不存在自动创建...
这篇“如何把nodejs数据传到前端”文章的知识点大部分人都不...
本文小编为大家详细介绍“nodejs如何实现定时删除文件”,内...
这篇文章主要讲解了“nodejs安装模块卡住不动怎么解决”,文...
今天小编给大家分享一下如何检测nodejs有没有安装成功的相关...