cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.43k stars 3.14k forks source link

certain accounts trigger "This browser or app may not be secure" when logging into accounts.google.com #24139

Open AtofStryker opened 1 year ago

AtofStryker commented 1 year ago

Current behavior

On develop, when trying to log into google with accounts.google.com set to top, I get a "This browser or app may not be secure" for certain accounts.

Desired behavior

user is able to log into google with accounts.google.com as top

Test code to reproduce

  it('logs in via Google SSO (top)', () => {
    Cypress.on('uncaught:exception', (err) => !err.message.includes('ResizeObserver loop limit exceeded'));
    cy.visit('https://accounts.google.com/');

    cy.get('input[type="email"]').type(Cypress.env('GOOGLE_USERNAME'));
    cy.contains('Next').click().wait(3000);
    // element never shows up
    cy.get('[type="password"]').type(Cypress.env('GOOGLE_PASSWORD'));

Cypress Version

10.10.0 (develop)

Node version

v16.16.0

Operating System

macOS 12.6

Debug Logs

No response

Other

This has happened to me before with cy.origin when running over an insecure hotspot

idanElitzur commented 1 year ago

I got error about Failed to load resource: the server responded with a status of 403 (Forbidden) when trying to connect by google account with cy.origin() --> cypress v10.10.0 with the cross-origin bugfixes. @AtofStryker

AtofStryker commented 1 year ago

@idanElitzur are you running with the experimentalModifyObstructiveThirdPartyCode flag? If this is still impacting your issue can you drop a comment with a link to a git repo that we can run to reproduce?

idanElitzur commented 1 year ago

Yes, I've tried now and it works ok, thanks a lot. :)

AtofStryker commented 1 year ago

I've been able to reproduce this in CI as well as on a hotspot

Dospios commented 1 year ago

I have the same problem in cypress v12.8.1

CP-MK commented 1 year ago

I have managed to get it to work with a cy.origin ui login, however for some reason it only works in the Cypress Studio.

So, running the test in the Cypress Studio -> works like a charm. Running the test with a command-line, using the same config on the same machine -> "This browser or app may not be secure" message

Does anyone have an idea, what the difference could be?

cypress-app-bot commented 3 weeks ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.