SFDX plugin not picking up http.proxy from VS code settings
See original GitHub issueSummary
The project I work on requires HTTP_PROXY environment variable to be set, for sfdx commands to work. I can set that using export HTTP_PROXY=http://MY_USERNAME:MY_PASSWORD@PROXY_URL:PORT
, and run the sfdx commands (e.g. sfdx force:source:retrieve
, or sfdx force:source:deploy
) manually. But this means that I cannot use the UI shortcuts provided by Salesforce extensions for VS Code, (SFDX: Retrieve this source from org
), because that fails with this error -
ERROR: Error: getaddrinfo ENOTFOUND MY_ORG_DOMAIN.my.salesforce.com:443
ERROR running force:source:retrieve: getaddrinfo ENOTFOUND MY_ORG_DOMAIN.my.salesforce.com MY_ORG_DOMAIN.my.salesforce.com:443
I tried to resolve this by setting http.proxy
setting in VS code for my project workspace, but this does not resolve the problem. I also tried experimenting with the http.proxyStrictSSL
, and http.proxySupport
settings, but that also didn’t worked.
My guess is that, Salesforce Extensions plugin only pick proxy settings from the http_proxy
and https_proxy
environment variables, but not from the VS code settings.
Steps To Reproduce:
- In VS Code, open command palette, and open ‘Prefrences: Open User Settings’
- Open the workspace tab, and search for ‘proxy’
- In the setting named Http: Proxy, set your desired proxy server URL
- Open command palette, and select ‘Developer: Reload Window’ to reload your workspace
- Open any salesforce resource (apex class, LWC component, apex trigger etc), right click, and select ‘SFDX: Retrieve this source from org’
Expected result
The sfdx force:source:retrieve
command that executes as part of step 5 should have completed successfully.
Actual result
The command fails with this error -
ERROR: Error: getaddrinfo ENOTFOUND MY_ORG_DOMAIN.my.salesforce.com:443
ERROR running force:source:retrieve: getaddrinfo ENOTFOUND MY_ORG_DOMAIN.my.salesforce.com MY_ORG_DOMAIN.my.salesforce.com:443
VS Code Version: Version: 1.47.0 Commit: d5e9aa0227e057a60c82568bf31c04730dc15dcd Date: 2020-07-09T08:01:54.115Z Electron: 7.3.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Darwin x64 19.5.0
SFDX CLI Version: sfdx-cli/7.56.1-2773b53bf5 darwin-x64 node-v10.15.3
OS and version: macOS Catalina Version 10.15.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Any update on this @lcampos and @smaddox-sf? We would like this capability as well.
We have this to our backlog and will prioritize it as possible. Currently we don’t have any updates on when it will be available. Sorry about that.