Cypress: Missing gconf2 dependency for Ubuntu 17.04: libgconf-2.so.4 error

Created on 3 Apr 2018  路  14Comments  路  Source: cypress-io/cypress

Error:

Cypress: error while loading shared libraries: libgconf-2.so.4: cannot open shared \
object file: No such file or directory

Ubuntu 17.04 doesn't ship anymore by default gconf2 (it uses dconf), so on a fresh Ubuntu 17.04 install you get this error after starting cypress

You'll need to install the missing library:

sudo apt install libgconf-2-4
linux electron

Most helpful comment

I had the same/similar issue installing cypress on Arch Linux. Installing the (deprecated) gconf package via e.g. pacman -S gconf then allows to run npm i cypress --save-dev without further warnings. Would agree with @craigiansmith

All 14 comments

Getting the same 馃憤

@ondrek did you have chrome installed when you got this error?

After running the command above to install libgconf-2-4, Cypress runs but presents the warning:

GLib-GIO-CRITICAL **: timestamp : g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION    
(connection)' failed

Then it proceeds to run the tests successfully. I have tried with and without Chrome installed, it doesn't seem to impact on it.

OS: Lubuntu 18.04
Cypress version: 3.1.0 (installed with NPM)

After a little searching I found that libgconf-2-4 is required by Electron, as it used to be required for Chrome. However, I believe Chrome has removed this dependency, so hopefully that will flow downstream and eventually the dependency could be removed from Cypress too.

I had the same/similar issue installing cypress on Arch Linux. Installing the (deprecated) gconf package via e.g. pacman -S gconf then allows to run npm i cypress --save-dev without further warnings. Would agree with @craigiansmith

Same issue with debian stretch.

@oupala You can install it by installing the libgconf-2-4 package: https://packages.debian.org/search?mode=exactfilename&suite=stretch&section=all&arch=any&searchon=contents&keywords=libgconf-2.so.4

To fix this issue, perhaps we should detect if the user has missing dependencies in the CLI, and then warn them? Something like:

To run Cypress, please install missing dependencies on your system:

sudo apt install libgconf-2-4 libasound2...

...because right now, it's not very well-documented.

It is not documented and the opposite is explicitly documented:

Just manually unzip and double click. Cypress will run without needing to install any dependencies.

And by the way, your workaround is working (installing the required library libgconf-2-4), thanks!

Yeah, that is probably the case for Windows and Mac, but not so for Linux.

Linux dependencies are documented in Continuous Integration for some reason: https://docs.cypress.io/guides/guides/continuous-integration.html#Dependencies

So I believe linux as a desktop is not documented.

Please check this workaround for Travis runs: https://github.com/cypress-io/cypress/issues/4069#issuecomment-488315675

@oupala You can install it by installing the libgconf-2-4 package: https://packages.debian.org/search?mode=exactfilename&suite=stretch&section=all&arch=any&searchon=contents&keywords=libgconf-2.so.4

To fix this issue, perhaps we should detect if the user has missing dependencies in the CLI, and then warn them? Something like:

To run Cypress, please install missing dependencies on your system:

sudo apt install libgconf-2-4 libasound2...

...because right now, it's not very well-documented.

You saved my ass!

This is listed as a dependency in our docs, so this issue will be closed as resolved. https://on.cypress.io/continuous-integration#Advanced-setup

I've opened a PR in the docs to also add the dependency requirements to the install doc, since I think this is the core of the issue https://github.com/cypress-io/cypress-documentation/pull/2939

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stormherz picture stormherz  路  3Comments

brian-mann picture brian-mann  路  3Comments

dkreft picture dkreft  路  3Comments

zbigniewkalinowski picture zbigniewkalinowski  路  3Comments

weskor picture weskor  路  3Comments