Skip to content

misc: throw error when chrome 137 branded is used with @cypress/puppeteer or --load-extension #31709

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

Merged
merged 1 commit into from
May 16, 2025

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented May 13, 2025

Additional details

With the release of Chrome v137, the --load-extension launch argument will no longer be supported in branded versions of chrome. This impacts the @cypress/puppeteer plugin and users leveraging launchOptions.extensions to add extensions to Chrome. If users need to leverage these options, please use Chrome for Testing, Chromium, or another Chrome variant that supports loading extensions.

To mitigate this, Cypress will now print a warning if branded chrome 137 and up is detected and the --load-extension argument is passed in by a user. Additionally, @cypress/puppeteer will also error if branded chrome 137 and up is detected.

Steps to test

TODO: test the binary and verify functionality. Add unit tests and system tests that leverage the plugin

How has the user experience changed?

PR Tasks

Copy link

cypress bot commented May 13, 2025

cypress    Run #62488

Run Properties:  status check passed Passed #62488  •  git commit ff5fbb8c5c: misc: throw error when chrome 137 branded is used when the @cypress/puppeteeris ...
Project cypress
Branch Review misc/throw_error_on_extension_chrome_137
Run status status check passed Passed #62488
Run duration 09m 49s
Commit git commit ff5fbb8c5c: misc: throw error when chrome 137 branded is used when the @cypress/puppeteeris ...
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 694
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 130
View all changes introduced in this branch ↗︎

@AtofStryker AtofStryker force-pushed the misc/throw_error_on_extension_chrome_137 branch 2 times, most recently from 748fcdd to 17d43a6 Compare May 13, 2025 23:38
@alexsch01
Copy link
Contributor

alexsch01 commented May 14, 2025

So, if I'm understanding this properly.....

Cypress will no longer support Google Chrome (in headed mode) and just error out and not actually run the tests?
That sucks to hear

@jennifer-shehane jennifer-shehane self-requested a review May 14, 2025 13:02
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Looks good outside of a suggestion on making the changelog more terse and actionable.

@@ -46,6 +46,8 @@ Add the following in `tsconfig.json`:

Only Chromium-based browsers (e.g. Chrome, Chromium, Electron) are supported.

As of Chrome 137, the `@cypress/puppeteer` plugin will not work in `cypress open` mode (or headed `run` mode) with official branded versions of Chrome (`stable`, `beta`, `dev`, and `canary`). If you need to run the `@cypress/puppeteer` in `cypress open` mode, you will need to use [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing), Chromium, or another Chrome variant that supports loading web extensions. The plugin will work as expected in `cypress run` mode in any version of Chrome.
Copy link
Member

Choose a reason for hiding this comment

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

I already merged a PR for this doc update, so you need to pull in develop.

@jennifer-shehane
Copy link
Member

@alexsch01 We will only error if you are using the @cypress/puppeteer plugin or the launchOptions.extensions API - because those features will not work in Chrome 137+ - so we want them to be notified instead of silently failing. For all other users not using these packages/APIs Cypress will work the same as before for Chrome branded browsers.

@AtofStryker AtofStryker force-pushed the misc/throw_error_on_extension_chrome_137 branch 6 times, most recently from 75f6190 to d98bad5 Compare May 15, 2025 17:23
@AtofStryker AtofStryker changed the title misc (draft): throw error when chrome 137 branded is used with @cypress/puppeteer or --load-extension misc: throw error when chrome 137 branded is used with @cypress/puppeteer or --load-extension May 15, 2025
@AtofStryker AtofStryker force-pushed the misc/throw_error_on_extension_chrome_137 branch from d98bad5 to 4864c12 Compare May 15, 2025 17:46
@AtofStryker AtofStryker force-pushed the misc/throw_error_on_extension_chrome_137 branch 2 times, most recently from 91abfc2 to 37835e0 Compare May 15, 2025 19:25
…uppeteeris used in headed mode or if --load-extension is added to launch options via a user testing an extension

empty commit to run ci
@AtofStryker AtofStryker force-pushed the misc/throw_error_on_extension_chrome_137 branch from 37835e0 to ff5fbb8 Compare May 15, 2025 20:16
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

Wish I could have gotten the manual testing working, but this code looks good.

@AtofStryker AtofStryker merged commit 713575b into develop May 16, 2025
133 of 137 checks passed
@AtofStryker AtofStryker deleted the misc/throw_error_on_extension_chrome_137 branch May 16, 2025 13:23
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2025

Released in 14.4.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants