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

Unable to detect firefox on RHEL Linux 7 #6669

Closed
geyuqiu opened this issue Mar 6, 2020 · 9 comments · Fixed by #6712
Closed

Unable to detect firefox on RHEL Linux 7 #6669

geyuqiu opened this issue Mar 6, 2020 · 9 comments · Fixed by #6712

Comments

@geyuqiu
Copy link

geyuqiu commented Mar 6, 2020

Current behavior:

firefox is installed (ran successfully with protractor)

run cypress run --browser firefox

error message: only detected browser: chrome, electron

specifying launch path --browser /bin/firefox does not work either

Desired behavior:

Test code to reproduce

similiar to this

Versions

4.1

@geyuqiu geyuqiu changed the title Unable to detect firefox on RHEeL 7 Unable to detect firefox on RHEL Linux 7 Mar 6, 2020
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Mar 9, 2020

Please see our troubleshooting guide on Launching Browsers

@geyuqiu Could you run Cypress in debug mode specifically logging cypress:launcher logs and run cypress info and print the entire set of logs here?

@geyuqiu
Copy link
Author

geyuqiu commented Mar 9, 2020

@jennifer-shehane

> cypress info

  cypress:launcher detecting if the following browsers are present [ { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', versionRegex: /Google Chrome (\S+)/, profile: true, binary: [ 'google-chrome', 'chrome', 'google-chrome-stable' ] }, { name: 'chromium', family: 'chromium', channel: 'stable', displayName: 'Chromium', versionRegex: /Chromium (\S+)/, profile: true, binary: [ 'chromium-browser', 'chromium' ] }, { name: 'chrome', family: 'chromium', channel: 'canary', displayName: 'Canary', versionRegex: /Google Chrome Canary (\S+)/, profile: true, binary: 'google-chrome-canary' }, { name: 'firefox', family: 'firefox', channel: 'stable', displayName: 'Firefox', info: 'Firefox support is currently in beta! You can help us continue to improve the Cypress + Firefox experience by [reporting any issues you find](https://on.cypress.io/new-issue).', versionRegex: /^Mozilla Firefox ([^\sab]+)$/, profile: true, binary: 'firefox' }, { name: 'firefox', family: 'firefox', channel: 'dev', displayName: 'Firefox Developer Edition', info: 'Firefox support is currently in beta! You can help us continue to improve the Cypress + Firefox experience by [reporting any issues you find](https://on.cypress.io/new-issue).', versionRegex: /^Mozilla Firefox (\S+b\S*)$/, profile: true, binary: [ 'firefox-developer-edition', 'firefox' ] }, { name: 'firefox', family: 'firefox', channel: 'nightly', displayName: 'Firefox Nightly', info: 'Firefox support is currently in beta! You can help us continue to improve the Cypress + Firefox experience by [reporting any issues you find](https://on.cypress.io/new-issue).', versionRegex: /^Mozilla Firefox (\S+a\S*)$/, profile: true, binary: [ 'firefox-nightly', 'firefox-trunk' ] }, { name: 'edge', family: 'chromium', channel: 'stable', displayName: 'Edge', versionRegex: /Microsoft Edge (\S+)/, profile: true, binary: 'edge' }, { name: 'edge', family: 'chromium', channel: 'canary', displayName: 'Edge Canary', versionRegex: /Microsoft Edge Canary (\S+)/, profile: true, binary: 'edge-canary' }, { name: 'edge', family: 'chromium', channel: 'beta', displayName: 'Edge Beta', versionRegex: /Microsoft Edge Beta (\S+)/, profile: true, binary: 'edge-beta' }, { name: 'edge', family: 'chromium', channel: 'dev', displayName: 'Edge Dev', versionRegex: /Microsoft Edge Dev (\S+)/, profile: true, binary: 'edge-dev' } ] +0ms
  cypress:launcher checking one browser chrome +24ms
  cypress:launcher looking up chrome on linux platform +0ms
  cypress:launcher finding version string using command "google-chrome --version" +0ms
  cypress:launcher checking one browser chrome +28ms
  cypress:launcher looking up chrome on linux platform +1ms
  cypress:launcher finding version string using command "chrome --version" +0ms
  cypress:launcher checking one browser chrome +16ms
  cypress:launcher looking up chrome on linux platform +0ms
  cypress:launcher finding version string using command "google-chrome-stable --version" +0ms
  cypress:launcher Received error detecting browser binary: "chrome" with error: spawn chrome ENOENT +31ms
  cypress:launcher browser chrome not installed +0ms
  cypress:launcher stdout: Google Chrome 80.0.3987.132 +340ms
  cypress:launcher setting major version for {"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"80.0.3987.132","path":"google-chrome"} +1ms
  cypress:launcher browser chrome version 80.0.3987.132 major version 80 +0ms
  cypress:launcher stdout: Google Chrome 80.0.3987.132 +23ms
  cypress:launcher setting major version for {"name":"chrome","family":"chromium","channel":"stable","displayName":"Chrome","version":"80.0.3987.132","path":"google-chrome-stable"} +1ms
  cypress:launcher browser chrome version 80.0.3987.132 major version 80 +0ms
  cypress:launcher checking one browser chromium +0ms
  cypress:launcher looking up chromium on linux platform +0ms
  cypress:launcher finding version string using command "chromium-browser --version" +0ms
  cypress:launcher checking one browser chromium +10ms
  cypress:launcher looking up chromium on linux platform +0ms
  cypress:launcher finding version string using command "chromium --version" +0ms
  cypress:launcher Received error detecting browser binary: "chromium-browser" with error: spawn chromium-browser ENOENT +10ms
  cypress:launcher browser chromium not installed +0ms
  cypress:launcher Received error detecting browser binary: "chromium" with error: spawn chromium ENOENT +1ms
  cypress:launcher browser chromium not installed +0ms
  cypress:launcher checking one browser chrome +0ms
  cypress:launcher looking up chrome on linux platform +0ms
  cypress:launcher finding version string using command "google-chrome-canary --version" +0ms
  cypress:launcher Received error detecting browser binary: "google-chrome-canary" with error: spawn google-chrome-canary ENOENT +11ms
  cypress:launcher browser chrome not installed +0ms
  cypress:launcher checking one browser firefox +1ms
  cypress:launcher looking up firefox on linux platform +0ms
  cypress:launcher finding version string using command "firefox --version" +0ms
  cypress:launcher stdout: Running without a11y support!
Mozilla Firefox 68.5.0esr +75ms
  cypress:launcher Could not extract version from Running without a11y support!
Mozilla Firefox 68.5.0esr using regex /^Mozilla Firefox ([^\sab]+)$/ +1ms
  cypress:launcher Received error detecting browser binary: "firefox" with error: Browser not installed: firefox +0ms
  cypress:launcher browser firefox not installed +0ms
  cypress:launcher checking one browser firefox +1ms
  cypress:launcher looking up firefox on linux platform +0ms
  cypress:launcher finding version string using command "firefox-developer-edition --version" +0ms
  cypress:launcher checking one browser firefox +11ms
  cypress:launcher looking up firefox on linux platform +0ms
  cypress:launcher finding version string using command "firefox --version" +0ms
  cypress:launcher Received error detecting browser binary: "firefox-developer-edition" with error: spawn firefox-developer-edition ENOENT +13ms
  cypress:launcher browser firefox not installed +0ms
  cypress:launcher stdout: Running without a11y support!
Mozilla Firefox 68.5.0esr +59ms
  cypress:launcher Could not extract version from Running without a11y support!
Mozilla Firefox 68.5.0esr using regex /^Mozilla Firefox (\S+b\S*)$/ +0ms
  cypress:launcher Received error detecting browser binary: "firefox" with error: Browser not installed: firefox +0ms
  cypress:launcher browser firefox not installed +0ms
  cypress:launcher checking one browser firefox +1ms
  cypress:launcher looking up firefox on linux platform +0ms
  cypress:launcher finding version string using command "firefox-nightly --version" +0ms
  cypress:launcher checking one browser firefox +11ms
  cypress:launcher looking up firefox on linux platform +0ms
  cypress:launcher finding version string using command "firefox-trunk --version" +0ms
  cypress:launcher Received error detecting browser binary: "firefox-nightly" with error: spawn firefox-nightly ENOENT +12ms
  cypress:launcher browser firefox not installed +0ms
  cypress:launcher Received error detecting browser binary: "firefox-trunk" with error: spawn firefox-trunk ENOENT +0ms
  cypress:launcher browser firefox not installed +0ms
  cypress:launcher checking one browser edge +0ms
  cypress:launcher looking up edge on linux platform +0ms
  cypress:launcher finding version string using command "edge --version" +0ms
  cypress:launcher Received error detecting browser binary: "edge" with error: spawn edge ENOENT +12ms
  cypress:launcher browser edge not installed +0ms
  cypress:launcher checking one browser edge +1ms
  cypress:launcher looking up edge on linux platform +0ms
  cypress:launcher finding version string using command "edge-canary --version" +0ms
  cypress:launcher Received error detecting browser binary: "edge-canary" with error: spawn edge-canary ENOENT +17ms
  cypress:launcher browser edge not installed +1ms
  cypress:launcher checking one browser edge +0ms
  cypress:launcher looking up edge on linux platform +0ms
  cypress:launcher finding version string using command "edge-beta --version" +0ms
  cypress:launcher Received error detecting browser binary: "edge-beta" with error: spawn edge-beta ENOENT +56ms
  cypress:launcher browser edge not installed +0ms
  cypress:launcher checking one browser edge +0ms
  cypress:launcher looking up edge on linux platform +1ms
  cypress:launcher finding version string using command "edge-dev --version" +0ms
  cypress:launcher Received error detecting browser binary: "edge-dev" with error: spawn edge-dev ENOENT +29ms
  cypress:launcher browser edge not installed +0ms
Displaying Cypress info...

Detected 1 browser installed:

1. Chrome
  - Name: chrome
  - Channel: stable
  - Version: 80.0.3987.132
  - Executable: google-chrome
  - Profile: /XXX/.config/Cypress/cy/production/browsers/chrome-stable

Note: to run these browsers, pass <name>:<channel> to the '--browser' field

Examples:
- cypress run --browser chrome

Learn More: https://on.cypress.io/launching-browsers

Proxy Settings: none detected
Environment Variables:
CYPRESS_RUN_BINARY: /XXX/cypress/Cypress/Cypress

Application Data: /XXX/.config/cypress/cy/development
Browser Profiles: /XXX/.config/cypress/cy/development/browsers
Binary Caches: /XXX/.cache/Cypress

Cypress Version: 4.1.0
System Platform: linux (Red Hat Linux - 7.7)
System Memory: 1.91 GB free 719 MB

$ which firefox
/bin/firefox

@geyuqiu
Copy link
Author

geyuqiu commented Mar 9, 2020

.bash_profile

export CYPRESS_RUN_BINARY=$HOME/cypress/Cypress/Cypress
# work around to install cypress dependency (4.1.0 LINUX) because it cannot be installed via npm

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Mar 11, 2020

Relevant logs involving Firefox:

cypress:launcher checking one browser firefox +1ms
cypress:launcher looking up firefox on linux platform +0ms
cypress:launcher finding version string using command "firefox --version" +0ms
cypress:launcher stdout: Running without a11y support!
Mozilla Firefox 68.5.0esr +75ms
cypress:launcher Could not extract version from Running without a11y support!
Mozilla Firefox 68.5.0esr using regex /^Mozilla Firefox ([^\sab]+)$/ +1ms
cypress:launcher Received error detecting browser binary: "firefox" with error: Browser not installed: firefox +0ms
cypress:launcher browser firefox not installed +0ms

So, it seems to be saying -

Could not extract version from "Running without a11y support! Mozilla Firefox 68.5.0esr"

@geyuqiu Did you rename your Firefox application to "Running without a11y support! Mozilla Firefox"?

@flotwig
Copy link
Contributor

flotwig commented Mar 12, 2020

Looks like firefox --version is including an unexpected line of output ("Running without a11y support!") which is breaking the regex because it's not multiline.

I think adding m to the Firefox versionRegexes should work around this.

@flotwig flotwig self-assigned this Mar 12, 2020
@cypress-bot cypress-bot bot added stage: work in progress There is an open PR for this issue [WIP] stage: needs review The PR code is done & tested, needs review and removed stage: needs information Not enough info to reproduce the issue stage: needs review The PR code is done & tested, needs review labels Mar 12, 2020
@cypress-bot cypress-bot bot added stage: pending release There is a closed PR for this issue and removed stage: work in progress There is an open PR for this issue [WIP] labels Mar 12, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 12, 2020

The code for this is done in cypress-io/cypress#6712, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@geyuqiu
Copy link
Author

geyuqiu commented Mar 16, 2020

Relevant logs involving Firefox:

cypress:launcher checking one browser firefox +1ms
cypress:launcher looking up firefox on linux platform +0ms
cypress:launcher finding version string using command "firefox --version" +0ms
cypress:launcher stdout: Running without a11y support!
Mozilla Firefox 68.5.0esr +75ms
cypress:launcher Could not extract version from Running without a11y support!
Mozilla Firefox 68.5.0esr using regex /^Mozilla Firefox ([^\sab]+)$/ +1ms
cypress:launcher Received error detecting browser binary: "firefox" with error: Browser not installed: firefox +0ms
cypress:launcher browser firefox not installed +0ms

So, it seems to be saying -

Could not extract version from "Running without a11y support! Mozilla Firefox 68.5.0esr"

@geyuqiu Did you rename your Firefox application to "Running without a11y support! Mozilla Firefox"?

I didn't rename firefox as you suggested. What is the current status, ready to release but not yet released ? @flotwig @jennifer-shehane

@bahmutov
Copy link
Contributor

@geyuqiu it means we have merged the fix into develop branch but have not published a new version of Cypress yet. Should be published later today as 4.2.0

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 16, 2020

Released in 4.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.2.0, please open a new issue.

@cypress-bot cypress-bot bot removed the stage: pending release There is a closed PR for this issue label Mar 16, 2020
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants