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 --browser crashes for paths with double backslashes (\\) on Windows (Chrome and Edge) #14719

Closed
SagarGaniga opened this issue Jan 23, 2021 · 2 comments · Fixed by #14723

Comments

@SagarGaniga
Copy link
Contributor

Current behavior

While triggering the build, my ruby script is escaping the backslash making it C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe. For this path, Cypress launches the browser with an error and can't proceed with tests. Same behavior on MS Edge as well.

Note: Works fine for Firefox

Logs

C:~Path> cypress run --browser "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"


====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:    6.3.0                                                                              │
  │ Browser:    Custom Chrome                                                                      │
  │ Specs:      19 found (examples\actions.spec.js, examples\aliasing.spec.js, examples\assertions │
  │             .spec.js, examples\connectors.spec.js, examples\cookies.spec.js, examples\cypress_ │
  │             api.spec.js, examples\files.spec.js, examples\local_storage.spec.js, examples\loca │
  │             tion.spec.j...)                                                                    │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────

  Running:  examples\actions.spec.js                                                       (1 of 19)

Timed out waiting for the browser to connect. Retrying...


Timed out waiting for the browser to connect. Retrying again...

The browser never connected. Something is wrong. The tests cannot run. Aborting...

The browser never connected. Something is wrong. The tests cannot run. Aborting...

Screenshot

image

Works fine when I remove extra \ in the path

C:~Path> cypress run --browser "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

Desired behavior

Should launch browser correctly and run tests end to end for all win32 file paths. At lease handle double escapes :)

Test code to reproduce

Just running the default example with --browser and browser path with \\, you should get this on a Windows 10 machine very easily.

Versions

Cypress: 6.3.0
OS: Windows 10
Browser: Chrome 87, Edge 88 (Have tried lower version as well)

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 8, 2021

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

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 16, 2021

Released in 6.5.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants