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 doesnt detect firefox 64 bit #8432

Closed
kaviad3 opened this issue Aug 27, 2020 · 10 comments · Fixed by #8460
Closed

Cypress doesnt detect firefox 64 bit #8432

kaviad3 opened this issue Aug 27, 2020 · 10 comments · Fixed by #8460
Assignees

Comments

@kaviad3
Copy link

kaviad3 commented Aug 27, 2020

I installed cypress and visual studio , I am using Firefox browser , when I opened Cypress Test Runne it shows only chrome but I need to run test only on Firefox

ta

When I tried to run the tests from the test runner I am getting the following error

image

When I tried to run the command : ./node_modules/.bin/cypress run --browser firefox I got this error

Can't run because you've entered an invalid browser name.

Browser: 'firefox' was not found on your system or is not supported by Cypress.

Cypress supports the following browsers:
- chrome
- chromium
- edge
- electron
- firefox (Cypress support in beta)

You can also use a custom browser: https://on.cypress.io/customize-browsers

Available browsers found on your system are:
- chrome
- electron
glob error [Error: ECANCELED: operation canceled, scandir 'C:\CypressProjects\CypressAutomation\cypress\integration\examples'

] {
  errno: -4081,
  code: 'ECANCELED',
  syscall: 'scandir',
  path: 'C:\\CypressProjects\\CypressAutomation\\cypress\\integration\\examples'

Desired behavior:

I checked and the cypress should support firefox from V4.0.1

Test code to reproduce

describe ("My test", function() 
{
    // all the tests 
    it("my first case", function() {
        cy.visit("https://rahulshettyacademy.com/seleniumPractise/#/")
        cy.get (".search-keyword").type("ca")
        cy.wait (3000)
        cy.get(".product:visible").should("have.length",4)

        //Parent child changning 
        cy.get('.products').find('.product').should("have.length",4)
        cy.get('.products').find('.product').eq(2).contains("ADD TO CART").click()
    ()
    } ) 
}  )

Versions

windows 10 Enterprise version 1709
Cypress package version: 4.12.1
Cypress binary version: 4.12.1
FireFox 79.0 64 bit
node v12.18.3

@jennifer-shehane
Copy link
Member

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

I'm not able to recreate the issue in Chrome and seeing the error message, I suspect you are behind a proxy?

Please refer to our instructions on how to set up your proxy configuration so that Cypress doesn't encounter any errors.

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue browser: firefox labels Aug 28, 2020
@kaviad3
Copy link
Author

kaviad3 commented Aug 31, 2020

Sorry for my delay respond , I rechecked again and now the test pass in chrome but can you check why cypress doesn't recognize FireFox, attached the debug log . Do you need any more details ?
cypress debug log.txt

@flotwig
Copy link
Contributor

flotwig commented Aug 31, 2020

The log you shared doesn't seem to contain any DEBUG output

@kaviad3 what path is Firefox installed at on your system?

@kaviad3
Copy link
Author

kaviad3 commented Aug 31, 2020

the path - \AppData\Local\Mozilla Firefox\firefox.exe"

@flotwig
Copy link
Contributor

flotwig commented Aug 31, 2020

Currently Cypress only searches the system-wide installation locations for Firefox (Program Files, Program Files (x86)):

function getFirefoxPaths (editionFolder) {
return () => {
return (['Program Files', 'Program Files (x86)'])
.map((programFiles) => {
return normalize(`C:/${programFiles}/${editionFolder}/firefox.exe`)
})
}
}

Probably this should be extended to include the AppData folder as well, like we already do for Chrome

@kaviad3 how did you install Firefox?

@kaviad3
Copy link
Author

kaviad3 commented Sep 1, 2020

The Firefox was already installed when I got the laptop , I am using my work laptop . When this issue will be fixed

@flotwig
Copy link
Contributor

flotwig commented Sep 1, 2020

Able to reproduce by installing Firefox and declining to install as admin. Ends up installing at this location:

C:\Users\nonadmin\AppData\Local\Mozilla Firefox\firefox.exe
C:\Users\nonadmin\AppData\Local\Firefox Nightly\firefox.exe
C:\Users\nonadmin\AppData\Local\Firefox Developer Edition\firefox.exe

@bahmutov
Copy link
Contributor

bahmutov commented Sep 1, 2020 via email

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 1, 2020

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

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Sep 1, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 1, 2020

Released in 5.1.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Sep 1, 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