错误[启动器]:ChromeHeadless stderr:无此类文件或目录

时间:2019-05-23 08:49:22

标签: linux gitlab devops google-chrome-headless

我在gitlab中设置作业,并且在karma.conf.js文件和package.json文件中使用浏览器作为ChromeHeadlessNoSandbox,并给出了以下版本-

"karma": "^1.7.1",
"karma-chrome-launcher":"^2.2.0",

在我的git yml文件中,我还添加了以下行-

apt-get install gconf-service libasound2 libatk1.0–0 libc6 libcairo2 libcups2 libdbus-1–3 libexpat1 libfontconfig1 libgcc1 libgconf-2–4 libgdk-pixbuf2.0–0 libglib2.0–0 libgtk-3–0 libnspr4 libpango-1.0–0 libpangocairo-1.0–0 libstdc++6 libx11–6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget -y

但是在触发CI时出现以下错误-

22 05 2019 09:48:04.236:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
22 05 2019 09:48:04.239:INFO [launcher]: Launching browser ChromeHeadlessNoSandbox with unlimited concurrency
22 05 2019 09:48:04.243:INFO [launcher]: Starting browser ChromeHeadless
22 05 2019 09:48:04.263:ERROR [launcher]: Cannot start ChromeHeadless
/app/node_modules/puppeteer/.local-chromium/linux-624492/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory

0 个答案:

没有答案