cypress
cypress copied to clipboard
cypress info does not detect firefox (snap installation) if started via linux cronjob
Current behavior
Running cypress info in a bash detects firefox:
$ cd /home/fl/project_dir
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/local/ssl/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
$ npx cypress info
...
Detected 2 browsers installed:
1. Chrome
- Name: chrome
- Channel: stable
- Version: 120.0.6099.129
- Executable: google-chrome
- Profile: /home/fl/.config/Cypress/cy/production/browsers/chrome-stable
2. Firefox
- Name: firefox
- Channel: stable
- Version: 120.0
- Executable: firefox
- Profile: /home/fl/snap/firefox/current/Cypress/firefox-stable
...
Proxy Settings: none detected
Environment Variables: none detected
Application Data: /home/fl/.config/cypress/cy/development
Browser Profiles: /home/fl/.config/cypress/cy/development/browsers
Binary Caches: /home/fl/.cache/Cypress
Cypress Version: 13.6.2 (stable)
System Platform: linux (Ubuntu - 22.04)
System Memory: 8.2 GB free 3.49 GB
This crontab
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/local/ssl/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
* * * * * cd /home/fl/project_dir && npx cypress info &> /tmp/cronjob.log
does not detect firefox as the content of /tmp/cronjob.log shows:
...
Detected 1 browser installed:
1. Chrome
- Name: chrome
- Channel: stable
- Version: 120.0.6099.129
- Executable: google-chrome
- Profile: /home/fl/.config/Cypress/cy/production/browsers/chrome-stable
...
Proxy Settings: none detected
Environment Variables: none detected
Application Data: /home/fl/.config/cypress/cy/development
Browser Profiles: /home/fl/.config/cypress/cy/development/browsers
Binary Caches: /home/fl/.cache/Cypress
Cypress Version: 13.6.2 (stable)
System Platform: linux (Ubuntu - 22.04)
System Memory: 8.2 GB free 3.48 GB
Desired behavior
firefox should be detected.
Test code to reproduce
See above
Cypress Version
13.6.2 (stable)
Node version
v20.10.0
Operating System
linux (Ubuntu - 22.04)
Debug Logs
No response
Other
As as workaround I use the -b option of cypress run:
npx cypress run -b /snap/firefox/current/usr/lib/firefox/firefox
Many thanks in advance.
confirming this is a problem i see as well