【问题标题】:Running Cypress in Bitbucket pipelines fails looking for chrome在 Bitbucket 管道中运行 Cypress 无法查找 chrome
【发布时间】:2019-04-29 10:22:22
【问题描述】:

我不知道为什么它会尝试运行 Chrome 而不是基于 Electron 的浏览器。可能是珀西的罪魁祸首?

+ yarn cy:ci --parallel --ci-build-id $BITBUCKET_BUILD_NUMBER
yarn run v1.13.0
$ cd cypress && yarn ci --parallel --ci-build-id 119
$ percy exec -- cypress run --record --parallel --ci-build-id 119
[percy] created build #5: https://percy.io/DeepVision/doveze-cz/builds/1794467
Error: Failed to launch chrome!
/opt/atlassian/pipelines/agent/build/cypress/node_modules/puppeteer/.local-chromium/linux-650583/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
    at onClose (/opt/atlassian/pipelines/agent/build/cypress/node_modules/puppeteer/lib/Launcher.js:342:14)
    at Interface.helper.addEventListener (/opt/atlassian/pipelines/agent/build/cypress/node_modules/puppeteer/lib/Launcher.js:331:50)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

更多信息和配置在 gist:https://gist.github.com/FredyC/d5b82b485e65245102dd24f6df787f5f

【问题讨论】:

    标签: continuous-integration cypress bitbucket-pipelines


    【解决方案1】:

    在 Percy 支持人员的帮助下,使用图像 cypress/browsers:chrome67-ff57 解决了这个问题。

    【讨论】:

    • 您好,您能分享一下完整的管道 yaml 我们如何为 cypress 测试创建完整的管道 yaml 文件吗?
    猜你喜欢
    • 2021-09-06
    • 2019-06-06
    • 2020-12-12
    • 1970-01-01
    • 1970-01-01
    • 2021-06-06
    • 1970-01-01
    • 2019-03-31
    • 2022-01-11
    相关资源
    最近更新 更多