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
Failure to use NO_PROXY appropriately #19586
Comments
I am experiencing the same problem, though I think it's manifested differently... more like: #4303.. If this doesn't belong here, I'll be happy to create a new issue. Cypress Version Package Manager Operating system I also think the way the no_proxy is processed (specifically checking for "<-loopback>) makes no sense. It's specifically checking for that loopback string and when it doesn't find it adds "localhost", "127.0.0.1", and "::1" to the no_proxy variable. You'll see in my logs that I already have localhost and 127.0.01 in there. This doesn't really have any affect... just odd behavior.
As you can see, no_proxy is set correctly, but cypress can't access the server. Below is output from when I unset the proxy information and re-run it, which then successfully connects to the app.
Note: I've only added what I thought to be the relevant logs for both the failing and succeeding case. |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
The code referenced in the bug description still exists as previously described and the problem still exists. This is not a stale issue. |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
Still an issue that needs to be addressed |
From what I can see this PR needs to be merged first: https://github.com/Rob--W/proxy-from-env/pull/19 I question whether this codebase should be in the "proxy" business at all. It may find a more appropriate home in the dependency @cypress/request. WORKAROUND For anybody else with this problem, our solution was to update our build scripts to prime the cache dir (download and unzip) BEFORE we run Cypress. When Cypress runs it finds everything it needs in the cache and doesn't attempt the download. |
Current behavior
In our setup, both environment variables:
https_proxy
,NO_PROXY
and the.npmrc
configuration ofhttps_proxy
/noproxy
are configured.The particular Cypress download URL is being redirected Nexus via
CYPRESS_DOWNLOAD_MIRROR
and should not go via the proxy.All of this would work perfectly except:
During postinstall the
cypress:lib/tasks/download.js
task has the following function:Now
getProxyForUrl(url)
returns an empty string if it matchesNO_PROXY
or if there are no variables defined - these are not the same states and should be treated separately.The
||
treats empty string as falsey and therefore picks up theprocess.env.npm_config_https_proxy
but doesn't handle the correspondingprocess.env.npm_config_noproxy
setting so it incorrectly selects the proxy.Could you please adjust the function
getProxyForUrlWithNpmConfig
to correctly handleprocess.env.npm_config_noproxy
and/or treat "nothing defined" differently from proxy explicitly disabled for this domain?Debug logs
URLs changed!
Environment variables:
npmrc settings:
Debug logs:
Cypress Version
8.7.0
Package Manager
pnpm
Operating system
Linux
Other
No response
The text was updated successfully, but these errors were encountered: