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

Install fails if using vmware that contains Microsoft Edge browser #15485

Closed
5 tasks
blainehilton opened this issue Mar 15, 2021 · 6 comments · Fixed by #16990
Closed
5 tasks

Install fails if using vmware that contains Microsoft Edge browser #15485

blainehilton opened this issue Mar 15, 2021 · 6 comments · Fixed by #16990
Assignees
Labels
browser: edge topic: installation Issue during installation or downloading Cypress type: bug

Comments

@blainehilton
Copy link

Current behavior

I did the npm install cypress --save-deps and if I turn to use "run" instead of "open" at the command line it gives the error as well which is

We found an invalid configuration value:

Found an error while validating the `browsers` list. Expected `majorVersion` to be a string or a positive number. Instead the value was: `{"name":"edge","family":"chromium","channel":"stable","displayName":"Edge","version":"VMware Fusion 12.1.0","path":"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","majorVersion":null}

I have tried upgrading npm, restarting, reinstalling. I've tried googling the error message, I've tried searching for where this config file may be. I've tried searching the github issues. I'm not sure where to go from here. Any insights would be greatly appreciated.

The error is saying your Edge = "majorVersion":null
Test it running on Chrome npx cypress run --browser chrome --headless

Benny, thanks for your message. I tried that here, but the same thing happens:

npx cypress run --browser chrome --headless
We found an invalid configuration value:

Found an error while validating the `browsers` list. Expected `majorVersion` to be a string or a positive number. Instead the value was: `{"name":"edge","family":"chromium","channel":"stable","displayName":"Edge","version":"VMware Fusion 12.1.0","path":"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge","majorVersion":null}`

npx cypress info shows:

npx cypress info
Displaying Cypress info...

Detected 3 browsers installed:

1. Chrome
  - Name: chrome
  - Channel: stable
  - Version: 89.0.4389.82
  - Executable: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

2. Edge
  - Name: edge
  - Channel: stable
  - Version: VMware Fusion 12.1.0
  - Executable: /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

3. Firefox
  - Name: firefox
  - Channel: stable
  - Version: 86.0
  - Executable: /Applications/Firefox.app/Contents/MacOS/firefox-bin

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

Examples:
- cypress run --browser firefox
- cypress run --browser edge

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

Proxy Settings: none detected
Environment Variables: none detected

I went into the Applications folder and deleted Microsoft Edge as that is what the error was mentioning, then I ran the info command and Edge was gone. So I tried open and now it loaded "properly" with the "To help you get started" screen

Gleb Bahmutov
@bahmutov

Yeah, why is Edge version VMware Fusion 12.1.0? This breaks the version parser we have for browser versions. If this is expected Edge version, could you open a new github issue for us

Gleb, this is because I'm running VM Ware Fusion on my mac so that I can run Windows 10 as well. That makes sense then as I couldn't get past that error even after trying a different version of node and reinstalling everything from scratch.

npx cypress -v
Cypress package version: 6.6.0
Cypress binary version: 6.6.0
Electron version: 11.2.3
Bundled Node version: 12.18.3
node -v
v14.16.0
npm -v
6.14.11

Debug logs

Download method

  • [X ] npm
  • yarn
  • Direct download
  • other

Operating System

  • Linux
  • [X ] Mac Big Sur, Version 11.2.3
  • Windows

with vmWare Fusion Professional version 12.1.0 running Windows 8.1

Other

  • [ x] I'm installing latest Cypress version
  • [no proxy ] I'm behind a proxy
  • [did not try in CI ] This only occurs in CI
@blainehilton blainehilton added the topic: installation Issue during installation or downloading Cypress label Mar 15, 2021
@uebayasi
Copy link

A new comer & seeing the exact same problem.

Struggling to find the plugins directory to put browser filter configuration now.

https://docs.cypress.io/guides/guides/launching-browsers#Customize-available-browsers

@uebayasi
Copy link

I still have to hide /Applications/Microsoft Edge.app (I do chmod 0000 ... instead of rm) too.

The above config.browsers.filter(...) trick does not work, because it is applied after all existing browsers are listed.

@jennifer-shehane
Copy link
Member

We might want to fall back to 'version' instead of throwing if they're not even using this specific browser to run. Not sure if that's possible.

But yes, we try to strip out the major version for display in our GUI and stdout, so Running on Edge 56 for example. For this one....we're trying to strip out a major version from the VMware Fusion 12.1.0 version which is not expected.

@jennifer-shehane
Copy link
Member

In your plugins/index.js file, you can edit the browsers config, but...I'm not sure if this is early enough to fix the issue. You'd have to find the browser in the array that you want to edit, then change the majorVersion.

module.exports = (on, config) => {
  config.browsers[0].majorVersion = '12'

  console.log(config.browsers) // see what the browsers are now

  return config
}

I opened a PR here: #16990

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 23, 2021

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

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Jun 23, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jun 23, 2021

Released in 7.6.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
browser: edge topic: installation Issue during installation or downloading Cypress type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants