Open Roemer opened 11 months ago
I created a MR which potentially fixes this issue here: https://github.com/cypress-io/cypress/pull/28340
We had some reports previously that running Cypress was slower when connected to the Cloud, but we were unable to reproduce it at the time. We'll take a look.
Any news here?
The issue is visible by using a local proxy (eg. Fiddler) and redirecting cypress to Fiddler. Then you see in Fiddlers log, that the first request (which is to api-proxy.cypress.io
) is not visible in Fiddler (because it does not use the proxy at all) and then the second request (to api.cypress.io
) is visible in Fiddler.
We still need to use a workaround to get an immediate (fail) response for the first request:
echo "127.0.0.1 api-proxy.cypress.io" >> /etc/hosts
It works but having a correct solution would still be the preferred way.
@Roemer Can you provide a repo that would reproduce the issue? For us to run?
A repo would not be enough, you need a specific network setup to reproduce it.
Basically, if you have a setup that blocks any internet access but allow connecting via a proxy, you would see that the first request to api-proxy.cypress.io
is blocked and never reaches the proxy and then the second request to api.cypress.io
would come thru the proxy and work.
This issue is still pending and the corresponding PR was closed. It is almost impossible to create a sample repo / test for the issue as this needs a specific networking setup (which is often used by corporates). If a dev would look at the (now closed PR), it is fairly obvious that is it currently broken.
Current behavior
When running Cypress behind a corporate proxy, there is always a 1 minute overhead for each Cypress run when connecting to the Cypress Dashboard. The problem seems to be the "preflight" request, which first tries to connect to
api-proxy.cypress.io
without the system-wide defined proxy and then after 1 minute, it triesapi.cypress.io
with the correct proxy which then responds immediately.Desired behavior
No response
Test code to reproduce
This is a bit harder to reproduce easily. You need a setup where internet access is blocked unless a specific proxy is used, then define this proxy as
http_proxy
andhttps_proxy
environment variable and run Cypress.Cypress Version
13.5.0
Node version
v18.17.1
Operating System
Docker Container (Debian)
Debug Logs
Other
No response