Cannot load Cypress test runner in 3.3.0 behind proxy
See original GitHub issueApplication running in Docker, exposing http://localhost:3000
.
Corporate proxy with exceptions given for localhost
.
Error received:
Relevant debug log:
cypress:server:server Got CONNECT request from localhost:3000 +320ms
cypress:https-proxy Writing browserSocket connection headers { url: 'localhost:3000' } +303ms
cypress:server:cors Parsed URL { port: '3000', tld: 'localhost', domain: '' } +322ms
cypress:server:server HTTPS request does match URL: https://localhost:3000 with props: { port: '3000', tld: 'localhost', domain: '' } +1ms
cypress:https-proxy Not making direct connection { url: 'localhost:3000' } +1ms
cypress:https-proxy Making intercepted connection to 63361 +0ms
cypress:https-proxy making proxied connection { host: 'undefined:63361', proxy: 'http://proxyhostRedacted' } +0ms
cypress:network:agent Creating proxied socket for https://undefined:63361 through http://proxyhostRedacted +307ms
cypress:network:connect successfully connected { opts: { port: 8080, host: 'proxyhostRedacted', useTls: false, getDelayMsForRetry: [Function: getDelayForRetry] }, iteration: 0 } +318ms
cypress:network:agent Proxy socket for https://undefined:63361 established +11ms
cypress:https-proxy received upstreamSocket callback for request { port: 63361, hostname: undefined, err: Error: Error establishing proxy connection. Response from server was: HTTP/1.1 403 Forbidden
cypress.json:
So I noticed that cypress is trying to use a Proxy socket towards https://undefined
, so I added undefined
as an exception to the NO_PROXY environment variable in the shell that runs cypress, and everything started working again.
_Originally posted by @MichaelHindley in https://github.com/cypress-io/cypress/issues/4235#issuecomment-493857240_
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Troubleshooting | Cypress Documentation
Open Cypress via cypress open · Go to Developer Tools -> View App Data · This will take you to the directory in...
Read more >Setup Cypress.io to access a page through a proxy
Solution: I used the NO_PROXY=localhost HTTPS_PROXY=mycompanyproxy.com:443 while running the cypress tests as env variable. Ex:
Read more >cypress-io/cypress - Gitter
need help any recommendation where i can test my app with javascript off? ... After installing 3.3.0, behind corporate proxy the tested page...
Read more >JavaScript and TypeScript Tests - Datadog Docs
If you are running tests on an on-premises CI provider, such as Jenkins or self-managed GitLab CI, install the Datadog Agent on each...
Read more >Run your Cypress tests from behind a proxy - BrowserStack
Guide for running your Cypress tests when your application is behind a proxy. If you have correctly set up Local Testing but are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in
3.3.1
.@flotwig pastebin with debug logs without the
undefined
fix:https://pastebin.com/rpNR5QEG