Skip to content

Chrome update warning blocks hover tests #16693

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

Closed
jamime opened this issue May 26, 2021 · 6 comments · Fixed by #16694
Closed

Chrome update warning blocks hover tests #16693

jamime opened this issue May 26, 2021 · 6 comments · Fixed by #16694

Comments

@jamime
Copy link

jamime commented May 26, 2021

Current behavior

We use the official docker image https://github.com/cypress-io/cypress-docker-images/tree/master/browsers/node14.16.0-chrome89-ff86 and our builds that checked hover suddenly stopped working.

We build a lot of images and found that the issue lied in few specific chrome versions.

I connected using X11 and found that chrome sometimes displays an update message which means the .trigger('mouseover') does not work correctly.

image

Can't update Chrome
Chrome couldn't update to the latest version, so you're missing out on new features and security fixes.

Desired behavior

Chrome auto update should be disabled or dismissed.

Test code to reproduce

I'll create one and update the ticket.

No longer required.

Versions

Image Chrome Base Result
cypress/browsers:node12.18.3-chrome87-ff82 87.0.4280.66 12.18.3
custom 87.0.4280.66 14.16.0
custom 87.0.4280.88 14.16.0
custom 88.0.4324.96 14.16.0
custom 88.0.4324.146 14.16.0
custom 88.0.4324.150 14.16.0
custom 88.0.4324.182 14.16.0
cypress/browsers:node14.16.0-chrome89-ff86 89.0.4389.72 14.16.0
custom 89.0.4389.82 14.16.0
custom 89.0.4389.90 14.16.0
custom 89.0.4389.114 14.16.0
custom 89.0.4389.128 14.16.0
custom 90.0.4430.72 14.16.0
custom 90.0.4430.85 14.16.0
custom 90.0.4430.93 14.16.0
cypress/browsers:node14.16.0-chrome90-ff88 90.0.4430.212 14.16.0

cypress@7.4.0

@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 26, 2021

We pass the --disable-component-update flag to Chrome by default, so this popup shouldn't display. Are you overwriting any of the flags passed on launch to Chrome?

Some threads online seem to indicate maybe the --disable-component-update flag doesn't always work and suggest passing the --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' flag to not update Chrome til 2099.

If you haven't changed the default flags originally, can you try passing this flag like shown below to see if it gets rid of the popup?

// cypress/plugins/index.js
module.exports = (on, config) => {
  on('before:browser:launch', (browser = {}, launchOptions) => {
    if (browser.family === 'chromium' && browser.name !== 'electron') {
      // auto open devtools
      launchOptions.args.push(`--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'`)
    }

    // whatever you return here becomes the launchOptions
    return launchOptions
  })
}

@jennifer-shehane jennifer-shehane added the stage: awaiting response Potential fix was proposed; awaiting response label May 26, 2021
@jamime
Copy link
Author

jamime commented May 26, 2021

I'll give that a go now, I used this to simulate it in the newer versions of chrome it looks like they removed the popup in favour of the menu button.

// cypress/plugins/index.js
on("before:browser:launch", (browser = {}, launchOptions) => {
  launchOptions.args.push("--simulate-critical-update");
  return launchOptions;
});

Chrome 90.0.4430.212

image

@jamime
Copy link
Author

jamime commented May 26, 2021

Great, that worked correctly with the cypress/browsers:node14.16.0-chrome89-ff86 image.

image

Will this be added as a default option in a future version of cypress?

@jennifer-shehane
Copy link
Member

Yah I can open a PR for this.

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: awaiting response Potential fix was proposed; awaiting response labels May 26, 2021
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review stage: work in progress labels May 27, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 27, 2021

The code for this is done in cypress-io/cypress#16694, 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 Jun 7, 2021

Released in 7.5.0.

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

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

Successfully merging a pull request may close this issue.

2 participants