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

Firefox Nightly - no version found #6345

Closed
jennifer-shehane opened this issue Feb 6, 2020 · 6 comments · Fixed by #6364
Closed

Firefox Nightly - no version found #6345

jennifer-shehane opened this issue Feb 6, 2020 · 6 comments · Fixed by #6364

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Feb 6, 2020

Current behavior:

Tried to launch Cypress while having Firefox Nightly installed and Cypress will not open beyond this screen.

We're unable to pull of the 'version' of Firefox Nightly so it does not continue.

Screen Shot 2020-02-06 at 4 25 04 PM

It looks like the version is 74.0a1, maybe the letter is throwing it off.

Screen Shot 2020-02-06 at 4 42 37 PM

Desired behavior:

Ability to Cypress in Firefox Nightly

Versions

firefox branch - prerelease

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Feb 6, 2020
@jennifer-shehane jennifer-shehane changed the title Firefox Nightly - no version found (in pre Firefox Nightly - no version found (in pre-release) Feb 6, 2020
@flotwig
Copy link
Contributor

flotwig commented Feb 6, 2020

Believe I have it fixed, the versionRegexes were incorrect for Firefox. Try with these changes: 69d80d5

Also fixed a bug where on Linux, the binary names are firefox for dev edition and firefox-trunk for nightly.

@jennifer-shehane jennifer-shehane removed the stage: ready for work The issue is reproducible and in scope label Feb 7, 2020
@jennifer-shehane jennifer-shehane changed the title Firefox Nightly - no version found (in pre-release) Firefox Nightly - no version found Feb 7, 2020
@jennifer-shehane
Copy link
Member Author

I should have checked this yesterday, but this is not fixed for me. I am experiencing the exact same error as above in 4.0.0.

@jennifer-shehane jennifer-shehane added v4.0.0 🐛 Issue present since 4.0.0 OS: mac labels Feb 7, 2020
@cypress-bot cypress-bot bot added the stage: needs investigating Someone from Cypress needs to look at this label Feb 7, 2020
@YOU54F
Copy link
Contributor

YOU54F commented Feb 7, 2020

I think I have found the issue affecting firefox nightly, and edge builds.

These apps for chrome and firefox have 4 params in https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/index.ts

const detectCanary = partial(findApp, [
  'Google Chrome Canary.app',
  'Contents/MacOS/Google Chrome Canary',
  'com.google.Chrome.canary',
  'KSVersion',
])
const detectChrome = partial(findApp, [
  'Google Chrome.app',
  'Contents/MacOS/Google Chrome',
  'com.google.Chrome',
  'KSVersion',
])
const detectChromium = partial(findApp, [
  'Chromium.app',
  'Contents/DMacOS/Chromium',
  'org.chromium.Chromium',
  'CFBundleShortVersionString',
])
const detectFirefox = partial(findApp, [
  'Firefox.app',
  'Contents/MacOS/firefox-bin',
  'org.mozilla.firefox',
  'CFBundleShortVersionString',
])
const detectFirefoxDeveloperEdition = partial(findApp, [
  'Firefox Developer Edition.app',
  'Contents/MacOS/firefox-bin',
  'org.mozilla.firefoxdeveloperedition',
  'CFBundleShortVersionString',
])

These for firefox nightly and edge have 3

const detectFirefoxNightly = partial(findApp, [
  'Firefox Nightly.app',
  'Contents/MacOS/firefox-bin',
  'org.mozilla.nightly',
])
const detectEdgeCanary = partial(findApp, [
  'Contents/MacOS/Microsoft Edge Canary',
  'com.microsoft.Edge.Canary',
  'CFBundleShortVersionString',
])
const detectEdgeBeta = partial(findApp, [
  'Contents/MacOS/Microsoft Edge Beta',
  'com.microsoft.Edge.Beta',
  'CFBundleShortVersionString',
])
const detectEdgeDev = partial(findApp, [
  'Contents/MacOS/Microsoft Edge Dev',
  'com.microsoft.Edge.Dev',
  'CFBundleShortVersionString',
])
const detectEdge = partial(findApp, [
  'Contents/MacOS/Microsoft Edge',
  'com.microsoft.Edge',
  'CFBundleShortVersionString',
])

There needs to be a 4th param for

detectFirefoxNightly

const detectFirefoxNightly = partial(findApp, [
  'Firefox Nightly.app',
  'Contents/MacOS/firefox-bin',
  'org.mozilla.nightly',
  'CFBundleShortVersionString'
])

For edge, it should be

const detectEdgeCanary = partial(findApp, [
'Microsoft Edge Canary.app',
  'Contents/MacOS/Microsoft Edge Canary',
  'com.microsoft.Edge.Canary',
  'CFBundleShortVersionString',
])
const detectEdgeBeta = partial(findApp, [
'Microsoft Edge Beta.app',
  'Contents/MacOS/Microsoft Edge Beta',
  'com.microsoft.Edge.Beta',
  'CFBundleShortVersionString',
])
const detectEdgeDev = partial(findApp, [
'Microsoft Edge Dev.app',
  'Contents/MacOS/Microsoft Edge Dev',
  'com.microsoft.Edge.Dev',
  'CFBundleShortVersionString',
])
const detectEdge = partial(findApp, [
'Microsoft Edge.app',
  'Contents/MacOS/Microsoft Edge',
  'com.microsoft.Edge',
  'CFBundleShortVersionString',
])

This is because findApp function in utils.ts (https://github.com/cypress-io/cypress/blob/develop/packages/launcher/lib/darwin/util.ts) takes 4 parameters

  appName: string,
  executable: string,
  appId: string,
  versionProperty: string

@YOU54F
Copy link
Contributor

YOU54F commented Feb 7, 2020

Please see #6364

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs investigating Someone from Cypress needs to look at this labels Feb 7, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 7, 2020

The code for this is done in cypress-io/cypress#6364, 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 8, 2020

Released in 4.0.1.

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

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

3 participants