Skip to content
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

SFDX plugin not picking up http.proxy from VS code settings #2340

Open
prateekmathur1991 opened this issue Jul 13, 2020 · 7 comments
Open

SFDX plugin not picking up http.proxy from VS code settings #2340

prateekmathur1991 opened this issue Jul 13, 2020 · 7 comments
Labels

Comments

@prateekmathur1991
Copy link

Summary

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:

  1. In VS Code, open command palette, and open 'Prefrences: Open User Settings'
  2. Open the workspace tab, and search for 'proxy'
  3. In the setting named Http: Proxy, set your desired proxy server URL
  4. Open command palette, and select 'Developer: Reload Window' to reload your workspace
  5. 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

@prateekmathur1991
Copy link
Author

Any updates on this one?

@git2gus
Copy link

git2gus bot commented Aug 4, 2020

This issue has been linked to a new work item: W-7907789

@lcampos
Copy link
Contributor

lcampos commented Aug 4, 2020

Hi @prateekmathur1991 I can confirm this is a limitation in the extensions. I've added it to our list of items to look into and will provide an update on this once we schedule the work to address this.

cc @smaddox-sf

@prateekmathur1991
Copy link
Author

@lcampos Is there any update on this? Any tentative schedule when will this be available?

@bloxsome
Copy link

bloxsome commented Oct 8, 2021

Any update on this @lcampos and @smaddox-sf? We would like this capability as well.

@trinasfdx trinasfdx added the status:in review pr/issue is being reviewed label Apr 1, 2022
@mohanraj-r mohanraj-r added type:bug status:in review pr/issue is being reviewed type:enhancements Feedback to take into account for existing features and removed type:bug status:in review pr/issue is being reviewed labels Apr 1, 2022
@mohanraj-r
Copy link
Contributor

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.

@mohanraj-r mohanraj-r removed status:in review pr/issue is being reviewed type:bug labels Apr 1, 2022
@mohanraj-r mohanraj-r removed their assignment Apr 1, 2022
@cwarden
Copy link

cwarden commented Apr 12, 2024

Proxy support seems to be broken due to the transitive dependency on https-proxy-agent through request-light.

@diyer diyer added type:bug and removed type:enhancements Feedback to take into account for existing features labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants