Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress gives "libgconf-2.so.4: cannot open shared object file" error on Travis #4069

Closed
kutlaykural opened this issue Apr 30, 2019 · 3 comments
Labels
CI General issues involving running in a CI provider

Comments

@kutlaykural
Copy link

kutlaykural commented Apr 30, 2019

Current behavior:

image

Desired behavior:

To run successfully

Steps to reproduce: (app code and test code)

.travis.yml file is like this:

language: node_js
node_js:
    - 10.8
cache:
  directories:
    - ~/.npm
    - ~/.cache
  override:
    - npm install cypress --save-dev
install:
  - npm install cypress --save-dev

script:
  - $(npm bin)/cypress run --record false

Versions

Travis Platform: linux (Ubuntu Linux - 16.04)
Cypress Version: 3.1.1

@jennifer-shehane
Copy link
Member

Can you check some things? Do you have libgconf-2.so.4 in /home/username/.cache/Cypress/3.2.0/Cypress? If not, you might want to try deleting /home/username/.cache/Cypress/3.2.0 and reinstalling. Perhaps the unzipping got interrupted.

If you do indeed have /home/username/.cache/Cypress/3.2.0/Cypress/libgconf-2.so.4, can you run ldd to check that the correct libgconf-2.so.4 is being linked to?

You should be able to do this:

ldd /home/username/.cache/Cypress/3.2.0/Cypress/Cypress | grep libgconf-2

And receive this:

libgconf-2.so.4 => /home/username/.cache/Cypress/3.2.0/Cypress/libgconf-2.so.4 (0x00007f7800ddd000)

If not, something is wrong.

Also, you may want to look into running our docker images: https://github.com/cypress-io/cypress-docker-images

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Apr 30, 2019
@alexkb0009
Copy link

alexkb0009 commented May 1, 2019

Just encountered the same issue which required an update to our travis.yml config file.

It seems Travis has been updated/ing its build environment to Ubuntu 16.04 from Ubuntu 14 in the past few days.

According to this non-Travis similar issue from 2018, it appears more recent versions of Ubuntu no longer include libgconf-2-4 by default.

Based on this similar issue/solution, the following appears to work:

  1. Add libgconf-2-4 to apt dependencies list, e.g. in travis.yml:
    addons:
      apt:
        packages:
        - libgconf-2-4
    
  2. (Possibly not necessary) Add xvfb service (re: Travis recommendations):
    services:
    - xvfb
    
  3. Run travis cache --delete from repository directory to clear/reset Travis caches. May need to install the Travis CLI. Or there might be another way in Travis UI to do this that haven't found yet.
    (Clearing cache might not be needed but haven't tested w/o this step).

(Off Topic) Will look into using Docker at some point in the future as well.

@bahmutov
Copy link
Contributor

bahmutov commented May 2, 2019

I have confirmed that adding to .travis.yml the following fixes the problem

addons:
  apt:
    packages:
    - libgconf-2-4

See https://travis-ci.org/cypress-io/cypress-example-kitchensink/jobs/527472634

@bahmutov bahmutov closed this as completed May 2, 2019
@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label May 3, 2019
sapegin pushed a commit to styleguidist/react-styleguidist that referenced this issue May 3, 2019
- Add libconf to fix Cypress after Ubuntu upgrade (cypress-io/cypress#4069)
- Update npm version to 6.9
jennifer-shehane pushed a commit to cypress-io/cypress-documentation that referenced this issue May 6, 2019
* Update Travis example re: Travis env. update

In response to this issue - cypress-io/cypress#4069

* Update continuous-integration.md
gr2m added a commit to gr2m/universal-user-agent that referenced this issue Jul 19, 2019
gr2m added a commit to gr2m/universal-user-agent that referenced this issue Jul 19, 2019
azu added a commit to asciidwango/js-primer that referenced this issue Jul 23, 2019
marabesi added a commit to marabesi/testable that referenced this issue Aug 7, 2019
dgmstuart added a commit to varvet/tiny-autocomplete that referenced this issue Aug 8, 2019
Github notified us about two packages with significant vulnerabilities:

  - ecstatic WS-2019-0066
  - lodash CVE-2019-10744

After running `npm install` on a fresh installation, we got the
following message:

    found 6 high severity vulnerabilities
      run `npm audit fix` to fix them, or `npm audit` for details

After running `npm audit fix` we got:

    added 3 packages from 2 contributors, removed 1 package and updated 15 packages in 88.466s
    fixed 6 of 6 vulnerabilities in 603 scanned packages

...so it seems to have updated more than just the two which Github told us
about, but none of them seem to be major version updates, and the test
suite still passes, so I feel OK about this.

The newest Travis build pack is missing a dependency required by the
latest Cypress so we add it explicitly in Travis.yml:

  cypress-io/cypress#4069
meinaart added a commit to meinaart/cypress-plugin-snapshots that referenced this issue Aug 13, 2019
ryankshaw added a commit to instructure/tinymce-a11y-checker that referenced this issue Sep 9, 2019
topheman added a commit to topheman/npm-registry-browser that referenced this issue Jan 23, 2020
Following error in build https://travis-ci.org/topheman/npm-registry-browser/builds/640826657

```
/home/travis/.cache/Cypress/3.1.0/Cypress/Cypress: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
```

Solution found: cypress-io/cypress#4069
topheman added a commit to topheman/npm-registry-browser that referenced this issue Jan 23, 2020
Following error in build https://travis-ci.org/topheman/npm-registry-browser/builds/640826657

```
/home/travis/.cache/Cypress/3.1.0/Cypress/Cypress: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
```

Solution found: cypress-io/cypress#4069
anandaroop added a commit to anandaroop/geodata-sources that referenced this issue Jan 23, 2020
northkevin added a commit to northkevin/testdriven-app-2.5 that referenced this issue May 24, 2020
valentyn90 added a commit to valentyn90/React-Styleguidist that referenced this issue Oct 28, 2021
- Add libconf to fix Cypress after Ubuntu upgrade (cypress-io/cypress#4069)
- Update npm version to 6.9
@jennifer-shehane jennifer-shehane added CI General issues involving running in a CI provider and removed CI: travis labels Oct 5, 2023
Thunder0122 added a commit to Thunder0122/npm-brower-compatibility that referenced this issue Jul 4, 2024
Following error in build https://travis-ci.org/topheman/npm-registry-browser/builds/640826657

```
/home/travis/.cache/Cypress/3.1.0/Cypress/Cypress: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
```

Solution found: cypress-io/cypress#4069
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI General issues involving running in a CI provider
Projects
None yet
Development

No branches or pull requests

4 participants