On first loading of cypress with:
./node_modules/.bin/cypress open
To log or note that the library was missing.
Install Debian 9 Stretch in a VM (using Oracle VM).
Used nvm (0.33.2) to install latest node (8.4.0) and npm (5.3.0)
Created a default directory and cd and ran npm init
Ran npm install cypress --save-dev
Ran ./node_modules/.bin/cypress open
Shows on terminal:
dlazov@zovs-debian:~/projects/cypress-tests/first-app$ ./node_modules/.bin/cypress open
It looks like this is your first time using Cypress: 0.20.0
✔ Verified Cypress! /home/dlazov/projects/cypress-tests/first-app/node_modules/cypress/dist/Cypress
Opening Cypress...
Gtk-Message: Failed to load module "canberra-gtk-module"
Some searches indicated that this may be an O/S issue with a missing library:
I will try installing that lib after reporting this and see if that clears things up.
apt-get install libcanberra-gtk-module
@bahmutov do we actually need to do anything on this? How did the verification not catch the missing dependency error?
I think other than that Cypress did the right thing and told you exactly what was missing 😁
Based on how the message is written, I would assume this is a bug and would have an opened issue, as @dlazov did.
If this is the intended behavior, perhaps the language could be friendlier (I'm not sure if this is even under our control), but something like,
Based on your OS/environment, it looks like you'll need to install some more dependencies
to get Cypress up and running:
Missing modules:
- canberra-gtk-module
Install these dependencies then try running Cypress again.
We originally tried to do that, but OS can throw whatever message they want when there's a missing dependency so that's a rabbit hole of trying to parse those correctly.
But regardless the verification process literally does exactly this -- it verifies that all dependencies are installed required the run Cypress. Had it failed during that phase, the error message would have been clear.
It appears that it passed verification and then failed when trying to open which should indicate a bug of some sort.
We do have e2e tests around this behavior and they are passing correctly, so something about this OS environment is causing it to behave differently...
https://circleci.com/workflow-run/52166a5c-267b-44e0-b3e8-595e509b5de4
Hmm, Debian 9, our image used for building and testing is based on Debian 8
The same error occurred on Ubuntu 18.04 LTS.
i encountered this same issue as well on Ubuntu 18.04. installing the canberra library solved the issue.
sudo apt-get install libcanberra-gtk-module
@stevenyix This solved the issue thank you.
Closing. If you are experiencing, please run:
sudo apt-get install libcanberra-gtk-module
FWIW: removed the error message for me as well (Ubuntu 18.04, 64-bit). But it was not preventing Cypress from running, as far as I could tell.
Most helpful comment
i encountered this same issue as well on Ubuntu 18.04. installing the canberra library solved the issue.
sudo apt-get install libcanberra-gtk-module