cypress: CircleCI - error while loading shared libraries

when I try to run cypress tests in CircleCI via npm run cy:run, the following error is thrown:

npm run cy:run

> trail-scout@1.0.0 cy:run /home/circleci/project
> cypress run

It looks like this is your first time using Cypress: 3.1.3

[12:33:54]  Verifying Cypress can run /home/circleci/.cache/Cypress/3.1.3/Cypress [started]
[12:33:54]  Verifying Cypress can run /home/circleci/.cache/Cypress/3.1.3/Cypress [failed]
Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.
----------

/home/circleci/.cache/Cypress/3.1.3/Cypress/Cypress: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory
----------

Platform: linux (Debian - 9.5)
Cypress Version: 3.1.3

as a workaround I install the missing dependencies manually (before I run cypress tests):

sudo apt-get update
sudo apt-get install libxtst6 libgconf-2-4 libnss3 libasound2

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 17 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Hello folks, sorry for hijacking this ticket, but is there any documentation available in 2020, about which docker image should I import (I’m not using orbs because of internal reasons) in order to run tests?

Use-case: git clone repo, npm install, then cypress run. I have tried various combinations and installing some ubuntu video dependencies, but there all stuck to

Cypress failed to start.

This is usually caused by a missing library or dependency.

The error below should indicate which dependency is missing.

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.

----------

/home/circleci/.cache/Cypress/5.5.0/Cypress/Cypress: error while loading shared libraries: libXcomposite.so.1: cannot open shared object file: No such file or directory

Any help will be really appreciated!

@YOU54F, I tried that before. same error.

@udos I am afraid there is no getting around it then - you need the Cypress OS dependencies http://on.cypress.io/continuous-integration#Dependencies in the image that actually runs Cypress tests. Maybe there is a way in Circle to run your server in one image (the image with Python), and run Cypress tests in another image (cypress/base:8 in your case), but I don’t know how one would configure this