Vscode-cpptools: Error: Updating C/C++ dependencies behind a corporate proxy

Created on 20 Apr 2017  路  17Comments  路  Source: microsoft/vscode-cpptools

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed at stage: downloadPackages
Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TLSWrap.onread (net.js:564:26)

Finished

The proxy is set properly and the extension is getting installed. But throws error, when it updates the dependencies, after the Reload of the VS Code,

Most helpful comment

I also had this same problem until I found and updated the VSCode http.proxy setting.

File > Preferences > HTTP (section).
Copy http.proxy to User Settings, set its value, save the file, restart VSCode and voila:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' (4664 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (810 KB) .................... Done!
Downloading package 'Visual Studio Windows Debugger' (12081 KB) .................... Done!

Installing package 'C/C++ language components (Windows)'
Installing package 'ClangFormat (Windows)'
Installing package 'Visual Studio Windows Debugger'

Finished

Verified working with VSCode 1.10.2 and C/C++ 0.11.0.

All 17 comments

What version of VS Code and cpptools do you have? We haven't seen this error before. All the JavaScript that does this downloading is available in our extension's folder at out/src/packageManager.js so if anyone sees the issue let us know. @pieandcakes do you have any ideas?

@tempseptember I'm assuming closing and reopening VSCode gives you the same error.

Are you able to download the file from the link? It can be found in the C:\Users\<username>\.vscode\extensions\ms-vscode.cpptools-<version>\package.json file at the bottom under runtimeDependencies. For the version I'm running it shows as:

     "description": "C/C++ language components (Windows)",
      "url": "https://go.microsoft.com/fwlink/?linkid=845223",

As @sean-mcmanus mentioned, we have code in the packageManager.js file, specifically the DownloadFile method that will try and get the proxy settings from VSCode's settings and use them.

I also had this same problem until I found and updated the VSCode http.proxy setting.

File > Preferences > HTTP (section).
Copy http.proxy to User Settings, set its value, save the file, restart VSCode and voila:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' (4664 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (810 KB) .................... Done!
Downloading package 'Visual Studio Windows Debugger' (12081 KB) .................... Done!

Installing package 'C/C++ language components (Windows)'
Installing package 'ClangFormat (Windows)'
Installing package 'Visual Studio Windows Debugger'

Finished

Verified working with VSCode 1.10.2 and C/C++ 0.11.0.

I meet the same question, please give the example,thanks! @jrtitus

console output messages:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed at stage: downloadPackages
Error: getaddrinfo EAI_AGAIN go.microsoft.com:443
at Object.exports._errnoException (util.js:1026:11)
at errnoException (dns.js:33:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)

Finished

resolved
proxy set error

@pieandcakes
Yes, opening and closing the editor gives the same error each time.

{
"description": "C/C++ language components (Windows)",
"url": "https://go.microsoft.com/fwlink/?linkid=847741",
"platforms": [
"win32"
],
"binaries": []
}

Able to download the Bin_Windows.zip from the above location.
http.proxy is set in the User Settings.
Able to update to version 0.11.0 without any problem.
But, still updating fails with the following error:

Updating C/C++ dependencies...
Downloading package 'C/C++ language components (Windows)' Failed at stage: downloadPackages
Error: read ECONNRESET
at exports._errnoException (util.js:1026:11)
at TLSWrap.onread (net.js:564:26)
Finished

Maybe if you set "http.proxyStrictSSL": false?

Set "http.proxyStrictSSL": true
Same error:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed at stage: downloadPackages
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:572:26)

Finished

Set "http.proxyStrictSSL": false
Same error:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed at stage: downloadPackages
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:572:26)

Finished

@tempseptember The workaround for you might be to manually download and extract the required files and place the lock file manually. The only other suggestion I have to get us more information is to try and grab a Fiddler trace of the request going out and seeing what is hanging it up.

The zip files contain folders relative to your c:\users\<username>\.vscode\extensions\ms-vscode.cpptools-0.11.0 folder. After they are extracted, place an install.lock blank file in the folder and it will stop checking.

Set http.proxy to the proxy address and set "http.proxyStrictSSL": true in settings.

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' (4923 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (905 KB) .................... Done!
Downloading package 'Visual Studio Windows Debugger' (11875 KB) .................... Done!

Installing package 'C/C++ language components (Windows)'
Installing package 'ClangFormat (Windows)'
Installing package 'Visual Studio Windows Debugger'

Finished

Working with VS Code 1.14.1 and C/C++ 0.12.1.

Was setting the wrong proxy in the setting for http.proxy.
Set correct proxy address and set http.proxyStrictSSL to true and now it's working.
Apologies for this false negative issue.

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' (4923 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (905 KB) .................... Done!
Downloading package 'Visual Studio Windows Debugger' (11875 KB) .................... Done!

Installing package 'C/C++ language components (Windows)'
Installing package 'ClangFormat (Windows)'
Installing package 'Visual Studio Windows Debugger'

Finished

I have almost same problem on LInux (Mint). VSCode download packages, but freezes on Install step. The only way to solve it - run VSCode as root.

@MooNDeaR So you set the correct proxy and it still doesn't download? by running VSCode as root, i'm wondering if you have permissions issues to the temp directory or to your user root. we write in the temp as its downloading and to the user root (~/.) when the extension is expanded.

Hi all!
I had exactly the same problem (on Debian).
My http_proxy environment variable contains "server_name:port".
Even adding this value in my user settings (http.proxy) the download did not start.

I just added "https://" in http.proxy (ie "http.proxy": "https://server_name:port"), restart and VSCode starts downloading at startup.
Hope this helps ;-)

Just added

"http.proxyStrictSSL": false

Working! (macOS Sierra, VSCode v1.18.1)

FWIW, I set "http.proxy" and "http.proxyStrictSSL": true, but it doesn't work.
Only after I changed to "http.proxyStrictSSL": false, then it worked.

I had to set "http.proxySupport": "on". The default is override - whatever that means. Setting any of the other settings mentioned above didn't work for me. The http.proxy setting is picked up correctly from environment variables if not set.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisckc picture chrisckc  路  3Comments

arl picture arl  路  3Comments

jyavenard picture jyavenard  路  3Comments

SkyRiderMike picture SkyRiderMike  路  3Comments

peterwoods1 picture peterwoods1  路  3Comments