cypress: Launch Hanging on Ubuntu when `snap` version of Chromium is installed
Current behavior:
cypress open does not open Cypress.
cypress run just seems to hang.
Logs: https://pastebin.com/ULZwQEj8
Snapshot of behavior and logs:

System:

Desired behavior:
Should be able to run tests.
Test code to reproduce
As this is happening prior to Cypress running I don’t think its anything I can give reproduction steps for.
DEBUG=* $(npm bin)/cypress open
DEBUG=* $(npm bin)/cypress run
Are the commands I am running.
Versions
v4.3.0 and v4.4.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 11
- Comments: 22 (6 by maintainers)
I also have that issue:
Similar issue that I reported: https://github.com/cypress-io/cypress/issues/7027
Removed chromium from snapd and regular apt and now is worked.
Also solved by uninstalling the snap version of Chromium. Thanks @Lektro9 & @jbpallingayan.
@erosval Internally, that command runs the regular browser detection and then filters “firefox” from the list of detected browsers, so it hangs in the same place. It should probably be optimized to only lookup browsers matching the passed flag.
Try passing
--browser /absolute/path/to/firefoxto launch by a path directly, it might work since it should bypass browser detection entirely.Yeah, in the meantime, Cypress could still detect the Snap version of Chromium, and add a warning to it in the GUI that it may fail to launch. But I’d like to do some investigation to see if there’s an easy way for users to fix this… for example, if it’s possible to whitelist the Cypress profile dir manually, which would be like a one-time fix we can document and point users to.
I can reproduce this by installing Chromium as a snap instead of via apt.
Workaround:
Install Chromium via apt (
apt install chromium-browser) insteadstuck today on my work. i refresh everything but none of that resolve the issue. please help @bahmutov @jennifer-shehane
Fixed it by removing chromium browser on my laptop
And a workaround that doesn’t require any changes in packages, change the path for the command until the patch is on npm:
For fish shells:
for bash and similar:
Make sure to adjust the path for your system, so start by doing
echo $PATHand ensure that you don’t leave important things out, and make sure not to have/snap/binin your pathYes, I use Chrome, not Chromium-browser. Sometimes I liked having chromium for a few tests, but since I haven’t used it for a long time, it doesn’t bother me to uninstall it.
The command that I ran to remove chromium was:
sudo snap remove chromium