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 info does not detect firefox (snap installation) if started via linux cronjob #28611

Open
FrankL-git opened this issue Dec 29, 2023 · 1 comment
Labels
browser: firefox stage: ready for work The issue is reproducible and in scope type: bug

Comments

@FrankL-git
Copy link

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.

@thearchitector
Copy link

confirming this is a problem i see as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser: firefox stage: ready for work The issue is reproducible and in scope type: bug
Projects
None yet
Development

No branches or pull requests

3 participants