-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Investigate and Support logging into accounts.google.com with Google Chrome #22987
Comments
We have been investigating this issue for a few weeks now. From what it looks like, visiting We initially thought this error was scripting related, as it looked like the window objects were being edited upon visit, but were able to rule this out by setting up an empty This prompted some investigation into chromium and chrome canary to see if the issue persisted in these browsers. The issue persists in However, it looks like this behavior might be configurable through site isolation flags, even though this didn't seem to yield results the first time. We tried running with the Currently going to build the chromium binary on MacOS without the special list and point cypress to the binary and see what happens 😬 . |
We also don't believe SPDY/HTTP2 headers are playing a part or issue |
I was able to build the chromium binary, which took a few hours and unfortunately yielded the same results in development mode as chrome 😢 . I also tried passing some additional flags into chromium that I thought would be helpful:
After adding the flags and verifying they were passed in via the CLI, the results were still the same. |
The only other avenue I can think of that might be worth comparing to figure out the "what" here is comparing the GN builds of MS Edge (I believe this is private) and Electron to see how they contrast with the de-facto chromium build configuration. Brave might also be worth a look. The ungoogled-chromium project also gets past the implicit window issues with these build args. My guess is it has to do with a built dependency within chromium or something that is configurable with a build flag that isn't configurable at launch/run time. |
We should consider this when we offer browser binaries (#19241). It's a reason why we might want to build the chromium binary ourselves instead of just using the pre-built one. |
Do you have any followup about this issue? i'm dealing with the same issue too |
Hey @idanElitzur. Sorry that you are also running into this issue. The main blocker for this issue inside of chrome is that the iframe that contains Cypress is not an exact match on The good news is we have recently proven that making these iframes |
related to #23814 |
Thanks a lot @AtofStryker Should I do it by Electron in a meantime or by some API request under the hood? |
I hope it is out soon as well! In the meantime approach, I replied here to hopefully provide some type of workaround. Not ideal at all, but this won't be an issue for long! |
Hey @AtofStryker |
@idanElitzur This isn't released yet, but should be supported experimentally with #23872 and #23885. Targeting the |
@AtofStryker I upgraded to cypress 10.10.0 to use cy.origin() for google authentication (accounts.google.com). I am able to proceed with entering my email id and password. After that, the main application is not loading. Again, it is showing the page with the Google Login button. Could you please help me with the solution? I used the below code: cy.visit('Main application URL');
cy.findAllByText('google-saml').eq(1).click();
cy.origin('https://accounts.google.com/o/oauth2/auth/identifier', () => {
//Google Authentication
cy.get('input[type="email"]').type('email');
Cypress.on('uncaught:exception', (err) => {
if (err.message.includes('ResizeObserver')) {
return false;
}
});
cy.get('.VfPpkd-vQzf8d').eq(1).click(); //click on Next
cy.wait(2000);
cy.get('input[type="password"]').type('password');
cy.get('.VfPpkd-vQzf8d').eq(1).click(); //click on Signin
});
}); |
@MounikaBodicherla would you be able to provide a small reproduction repository that we could clone and run to reproduce the issue? |
Recently I got CAPTCHA (questions about my email and my security questions) when trying to login by google connect with Cypress (v11.1.0). |
@idanElitzur likely not since bot detection is outside of scope. Once our docs are updated for v12 I can point a reference here as to what our recommendations are. Have you tried programmatic login? |
Yes I did, didn't success for me, it's too complex maybe I missed something over there. |
@idanElitzur are you trying to log into google in CI? It might not work due to secure apps issue logged in #24139. We won't be recommending social logins in CI as they might cause non deterministic test failures that are out of your control. Can you provide a reproduction that prompts the captcha? |
Sure, actually my implementations seems very similar to yours -
The captcha that return in this use case is more screens about validate my email address and answer to security questions. |
Google did some under the hood changes around 2 weeks ago to more heavily bounce automated/bot traffic as we saw the same thing. Are you running this in CI? Also, would you be able to share a screenshot/video of what exactly you are seeing? |
Nope, I'm not execute it by the CI yet because is very flaky when executing this locally, almost the time is failed. |
@idanElitzur that is OK! It is fairly likely that someone at Cypress can speak Hebrew 😄 |
Hahaha 😆 So it always happens when executing cypress headless by chrome and electron --> Doesn't happen with firefox. With opened runner + chrome or headed chrome it almost the times works ok and sometimes it's failed and returns security questions about what's your email and your phone number and etc.. but it's not so oftenly. |
@idanElitzur Interesting. Have you tried Microsoft Edge or Electron? Wonder if standalone Chromium would yield the same results |
This also looks like the older service login page. Interesting that this is getting served. Are you running headless or headful in that screenshot just to clarify? |
Thanks for your answers :) Also happens with Cypress 12.0.1 |
What would you like?
I would like to be able to log into accounts.google.com as an identity provider within cypress using Google Chrome as my browser. Google login should work with the merging of #22958 and #22963 inside of Cypress when using Electron and Edge.
Why is this needed?
No response
Other
No response
The text was updated successfully, but these errors were encountered: