-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 running on HTTP protocol but Chrome tries to redirect to HTTPS (HSTS issue?) #2996
Comments
Hi, do you know if this also happens on previous versions of Cypress? Did this happen on upgrade or is this your first time running Cypress? |
Hi Jennifer, this was my first time running Cypress. I just tried installing 3.1.0 but no luck there either. |
What is your test code? What are you passing to |
Previously I was starting react app on port 3000 and using nginx to forward HTTPS to it. Not sure if that is related, but... I've switched to using |
Current behavior:
Opens Cypress, and I can run a test initially 👍.
But if I close the cypress browser, then restart, Chrome tries to redirect to HTTPS protocol (rather than HTTP where cypress is running).
(In text:)
Logs show HTTP 200 codes, then later HTTP 500 error codes:
I tried this with both Chrome and Electron.
Behavior in Electron was similar but I actually got the error messages below half-way through my two tests (I suspect HSTS was set after first test).
Desired behavior:
Either:
a) Chrome should always navigate to HTTP protocol / port, or
b) always HTTPS,
but not HTTP initially then HTTPS later.
I suspect that the issue is related to HSTS. Below you see that there's an HSTS entry for
localhost
that forces HTTPS; if I delete that (after every test) chrome no longer attempts to redirect to HTTPS.Steps to reproduce: (app code and test code)
will be forthcoming
Versions
cypress 3.1.4
Mac OS X 10.13.5
Chrome: 71
The text was updated successfully, but these errors were encountered: