Navigation Menu

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

feat: error/warn on unsupported browser versions #17355

Merged
merged 9 commits into from Jul 19, 2021

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Jul 15, 2021

  • Closes

User facing changelog

  • Cypress now enforces version checks for browser launching. Cypress supports Chrome >= 64, Firefox >= 86, and Edge >= 79.

Additional details

How has the user experience changed?

In cypress open, an unsupported browser will appear in the drop down, but greyed out and with a warning tooltip.

If the user clicks it, nothing will happen - the dropdown remains open and the unsupported browser is not selected.

If the user has an unsupported browser stored in their localStorage as the most recently chosen browser, the first supported detected browser will be selected instead next time the desktop GUI is opened.

image

In cypress run, an error is printed and the process exits:

image

PR Tasks

  • Have tests been added/updated?
  • Has the original issue or this PR been tagged with a release in ZenHub?
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 15, 2021

Thanks for taking the time to open a PR!

@flotwig flotwig changed the base branch from develop to 8.0-release July 15, 2021 19:35
@cypress
Copy link

cypress bot commented Jul 15, 2021



Test summary

4697 0 50 2Flakiness 2


Run details

Project cypress
Status Passed
Commit 952d355
Started Jul 16, 2021 1:54 PM
Ended Jul 16, 2021 2:06 PM
Duration 11:33 💡
OS Linux Debian - 10.9
Browser Electron 91

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/commands/net_stubbing_spec.ts Flakiness
1 ... > doesn't automatically parse response bodies if content is binary
2 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@@ -151,7 +176,8 @@ describe('browser detection', () => {
execa.withArgs('/bad-firefox', ['--version'])
.resolves({ stdout: 'Mozilla Firefox 79.1' })

expect(await detectByPath('/good-firefox')).to.not.have.property('warning')
// TODO: remove this warning/auto-GC, since Cy no longer supports FF < 86
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will open a separate PR to remove the auto-GC code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jennifer-shehane jennifer-shehane added the type: breaking change Requires a new major release version label Jul 15, 2021
@flotwig flotwig marked this pull request as ready for review July 16, 2021 14:23
@flotwig flotwig requested a review from a team as a code owner July 16, 2021 14:23
@flotwig flotwig requested review from chrisbreiding, kuceb, jennifer-shehane and a team and removed request for a team July 16, 2021 14:23
Comment on lines +41 to +42
Partial<Pick<Cypress.RuntimeConfigOptions, 'hosts' | 'projectName' | 'clientRoute' | 'devServerPublicPathRoute' | 'namespace' | 'report' | 'socketIoCookie' | 'configFile' | 'isTextTerminal' | 'isNewProject' | 'proxyUrl' | 'browsers'>>
& Partial<Pick<Cypress.ResolvedConfigOptions, 'supportFolder' | 'experimentalSourceRewriting' | 'fixturesFolder' | 'reporter' | 'reporterOptions' | 'screenshotsFolder' | 'pluginsFile' | 'supportFile' | 'integrationFolder' | 'baseUrl' | 'viewportHeight' | 'viewportWidth' | 'port' | 'experimentalInteractiveRunEvents'>>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is failing in 8.0-release, i think this is the correct fix?

flotwig added a commit that referenced this pull request Jul 16, 2021
This was a workaround added to fix a bug in FF < 80. Since Cy removed support for FF < 86 in #17355, this is effectively dead code.

This does not remove the ability for users to manually run `Cypress.backend('firefox:force:gc')`.
Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@flotwig flotwig merged commit deee831 into 8.0-release Jul 19, 2021
flotwig added a commit that referenced this pull request Jul 19, 2021
This was a workaround added to fix a bug in FF < 80. Since Cy removed support for FF < 86 in #17355, this is effectively dead code.

This does not remove the ability for users to manually run `Cypress.backend('firefox:force:gc')`.
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 20, 2021

Released in 8.0.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 20, 2021
@flotwig flotwig deleted the block-older-browsers branch January 24, 2022 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: breaking change Requires a new major release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants