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

Cypress-social-login works fine, but after the login, we redirect to a different URL using cy.visit() that fails to load using Etimedout #101

Open
sarathk-blink opened this issue Jun 2, 2021 · 1 comment

Comments

@sarathk-blink
Copy link

sarathk-blink commented Jun 2, 2021

I'm using cypress-social-login plugin to login into our application that uses google account as Oauth. I can see that the login happens successfully, cookies are being set and I can verify cookies on the cypress console. When I do cy.visit() after the social login to access my app with the URL, (that uses google account as sign-on) I see below error message.

We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:

Error: ETIMEDOUT
Common situations why this would fail:

  • you don't have internet access
  • you forgot to run / boot your web server
  • your web server isn't accessible
  • you have weird network configuration settings on your computer

Below are some troubleshooting steps:

  1. This issue is intermittent, happens about 7/10 times. The other 3 times I Can do social login fine and cy.visit() to our app loads the page. I even tried cy.visit() with https://www.google.com after the social login for the times when it failed, even the google page would timeout.

  2. I have verified my VPN settings, removed http, https proxy and made sure that the network connection is looking good.

  3. Removed and Reinstalled NPM, Node and cypress several times. (With different versions) - No luck.

  4. When I see that error, I then open a new tab manually on the same automation browser instance and I can load my app url just fine. But it wouldn't load in the same window of cypress after the social login.

  5. Works perfectly fine if I first visit my app url and then do a call social-login plugin (Just did the otherway to see where the problem is).

  6. When I try the same flow (Doing social-login first) then hitting my app URL manually, everything works just perfect. Doesn't work when I run via cypress automation.

I tried all other steps to debug from the internet and I'm not able to figure this out. Appreciate anyone that can help.

MacOs : Catalina 10.15.7
Node : v14.17.0
Npm : 6.14.13
Cypress: 6.8.0

@Cardoso-topdev
Copy link

Same here.
I like to do google OAuth login with a popup dialog and continue working on my website, without redirecting to the other page. If I insert login URL to the option object, it open a new browser after google login success. I don't like this.
Hi @lirantal!, Would you like to help me with this problem, please?
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants