-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
npm_config_proxy & npm_config_https_proxy are applied but npm_config_noproxy is ignored #27746
Comments
Hi @akcyp In order to give our engineers the best chance at recreating your problem, please create a reproducible example using a fork of Cypress Test Tiny. This gives us the best chance of seeing exactly what you are seeing and being able to investigate effectively. |
You may want to check if you have written |
@MikeMcC399 yeah, you are right - I meant @nagash77 I provided steps how you can reproduce it - just use any (working) proxy settings in your npm config and use local IP as The problem here is general - cypress takes part of configuration from npm - https://github.com/cypress-io/cypress/blob/v13.1.0/packages/server/lib/util/proxy.ts#L61 I was able to fix this problem by manually setting the |
@akcyp what is the use case for this setting? |
@nagash77 Sorry, I don't understand which setting you are asking about, what is unclear to you? |
Hi @akcyp I am trying to understand what you are using the |
@nagash77 Ok, let's start with Take a look on this example: # package.json
{
"name": "sample-node-project",
"version": "1.0.0",
"scripts": {
"start": "node"
}
} We will be executing this command to see all proxy related configurations: console.log(Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith('npm_config_') && key.includes('proxy')))) with single command it would be: node -e "console.log(Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith('npm_config_') && key.includes('proxy'))))" Firstly let's create npm configuration for corporate proxy: npm config set proxy http://proxy.company.com:80
npm config set https-proxy http://proxy.company.com:80
npm config set noproxy 10.0.1.32 Output for As we can observe - when using To verify that this is not coming from outsite, let's remove configuration and run this script again. From my research cypress under the hood is loading The problem I'm describing here is about Real usecase for this? I have a cypress project that needs to have proxy configuration to access some pages available only through vpn / proxy. I'm not using system HTTP_PROXY, etc. envs. but simply I have proper configuration in Because of this bug I have to move Hope this is clear now. If you have any other questions, fell free to ask. |
See also #19586 |
As said in #19586 (comment) this is is still an in 12.13.0 issue where the |
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. |
This issue has been closed due to inactivity. |
Current behavior
Page specified in
baseURL
cannot be loaded because of proxy settings specified in global npm config -noproxy
setting seems to be ignoredDesired behavior
Cypress should load
npm_config_noproxy
settings as well.Test code to reproduce
NPM with any proxy settings. For example:
baseURL
set to https://10.0.1.32/ (application working on local network)Cypress Version
10.11.0 (but probably on latest too)
Node version
v16.16.0
Operating System
Ubuntu 18.04.6 LTS
Debug Logs
No response
Other
https://github.com/cypress-io/cypress/blob/v13.1.0/packages/server/lib/util/proxy.ts#L61
Probably following line should be added:
The text was updated successfully, but these errors were encountered: