vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

C/C++ extensions fail to install

Open egamma opened this issue 9 years ago • 31 comments

From @csteres-cpi on May 5, 2017 1:14

  • VSCode Version:

Version 1.12.1 Commit f6868fce3eeb16663840eb82123369dec6077a9b Date 2017-05-04T21:21:43.120Z Shell 1.6.6 Renderer 56.0.2924.87 Node 7.4.0

  • OS Version: Ubuntu (note this is running in a VirtualBox guest VM under Windows 10) % uname -a Linux CSteresUbuntu32 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:33:44 UTC 2017 i686 i686 i686 GNU/Linux

Steps to Reproduce:

  1. Installed fresh copy of VScode using .deb package
  2. Installed C/C++ extensions 0.11.0; restart vscode
  3. When VScode starts up it tries to update dependencies; sometimes if fails during downloadPackages (varies as to which package it fails on:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Linux)' (6972 KB) .................... Done! Downloading package 'ClangFormat (Linux)' (731 KB) .................... Done! Downloading package 'Mono Framework Assemblies' (4751 KB) ....................Failed at stage: downloadPackages Error: read ECONNRESET at exports._errnoException (util.js:1022:11) at TLSWrap.onread (net.js:572:26)

Finished

3b: sometimes it manages to download all four package dependencies but fails on the install of one of them, for example:

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Linux)' (6972 KB) .................... Done! Downloading package 'ClangFormat (Linux)' (731 KB) .................... Done! Downloading package 'Mono Framework Assemblies' (4751 KB) .................... Done! Downloading package 'Mono Runtime (Linux / x86)' (1420 KB) .................... Done!

Installing package 'C/C++ language components (Linux)' Installing package 'ClangFormat (Linux)' Installing package 'Mono Framework Assemblies' Failed at stage: installPackages Error: end of central directory record signature not found

Finished

  1. In addition to this, the C/Cpp Language Server output shows errors:

[6:11:53 PM] Connection to server is erroring. Shutting down server. [6:11:53 PM] Connection to server is erroring. Shutting down server. [6:11:53 PM] Connection to server is erroring. Shutting down server.

Copied from original issue: Microsoft/vscode#25960

egamma avatar May 05 '17 08:05 egamma

I was able to install version 0.14.5 using offline installers. Recently it was automatically updated to 0.14.6 and i again got this error message:

"Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying...Waiting 32 seconds... Failed at stage: downloadPackages Error: connect ETIMEDOUT 184.50.195.156:443 at Object.exports._errnoException (util.js:1050:11) at exports._exceptionWithHostPort (util.js:1073:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)

If you work in an offline environment or repeatedly see this error, try downloading a version of the extension with all the dependencies pre-included from https://github.com/Microsoft/vscode-cpptools/releases, then use the "Install from VSIX" command in VS Code to install it."

Installing VSIX for version 0.14.6 didn't help. So, i had to come back to 0.14.5. Looks like regression.

valkuzn avatar Jan 21 '18 21:01 valkuzn

@valkuzn I think you want to set "extensions.autoUpdate" to false. What do you mean by installing the 0.14.6 vsix didn't help? Did you uninstall the previous online version? What error is shown with the 0.14.6 offline installer?

sean-mcmanus avatar Jan 22 '18 10:01 sean-mcmanus

@sean-mcmanus Right, so finally i disabled auto-update, uninstalled 0.14.6 and installed 0.14.5. And it's how it works right now. But firstly, after auto-update i tried to re-install offline (VSIX) version of 0.14.6 (because i thought that it could be that online upgrade is different from offline VSIX), and it failed with the same error message (from my previous email).

Again:

  1. I had working version 0.14.5, which i installed from VSIX (offline)
  2. It was auto-updated to 0.14.6. When upgrade had been finished, i got the error message from my previous message. IntelliSense stopped working and some Intellisense items disappeared from menu.
  3. I uninstalled version 0.14.6, downloaded version 0.14.6 VSIX and install it from this VSIX. Again got the same error message (from my previous message).
  4. Uninstalled version 0.14.6 again, disabled auto-update, installed 0,14.5 from VSIX. It worked.

valkuzn avatar Jan 22 '18 10:01 valkuzn

@valkuzn I'm not sure how to fix this, because I tried all your repro steps exactly, but the 0.14.6 VSIX installed successfully with no error, with no internet connection. My best guess is that the online 0.14.6 failed to uninstall fully, somehow blocking the offline 0.14.6 from installing. You might want to check C:\Users\<user>\.vscode\extensions\ms-vscode.cpptools-0.14.6 to make sure it's gone and that all the files exist as expected after installing the offline version, i.e. binaries in the bin folder.

sean-mcmanus avatar Jan 22 '18 19:01 sean-mcmanus

Also getting the same error:

Downloading package 'C/C++ language components (Windows)' Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed to download https://go.microsoft.com/fwlink/?linkid=874916 Failed at stage: downloadPackages Error: connect ETIMEDOUT 104.120.196.15:443 at Object.exports._errnoException (util.js:1050:11) at exports._exceptionWithHostPort (util.js:1073:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)

win10 64bit ms-vscode.cpptools-0.17.4

jelly1130 avatar Jun 21 '18 12:06 jelly1130

@jellydengjiali We have an offline vsix available for download for those cases: https://github.com/Microsoft/vscode-cpptools/releases .

sean-mcmanus avatar Jun 21 '18 19:06 sean-mcmanus

I've been having this issue too and I found at least a couple possible causes:

  • Our Linux VM environments are set up to use an internal corporate proxy via http_proxy and https_proxy (setting http.proxySupport=off fixed the issue for me)
  • It could also be that your certificates are out of date and you have http.proxyStrictSSL=true

I think additional output logging in the download progress would be helpful for users to troubleshoot this issue.

dpkristensen avatar Mar 26 '19 20:03 dpkristensen

win10 64bit ms-vscode.cpptools-0.23.0 Can you help me with this error?I'm online,it didn't work even though i uninstalled version 0.23.0 and then installed version 0.22.1. Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done! Downloading package 'ClangFormat (Windows)' Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done! Downloading package 'Visual Studio Windows Debugger' Failed. Retrying... Failed. Retrying... Failed. Retrying...Waiting 8 seconds... Failed. Retrying...Waiting 16 seconds... Failed. Retrying... Done!

Installing package 'C/C++ language components (Windows)' Failed at stage: installPackages Error: end of central directory record signature not found

If you work in an offline environment or repeatedly see this error, try downloading a version of the extension with all the dependencies pre-included from https://github.com/Microsoft/vscode-cpptools/releases, then use the "Install from VSIX" command in VS Code to install it.

Gan-Jason avatar May 11 '19 17:05 Gan-Jason

Same error. How do I fix this? Screenshot 2020-07-26 at 1 32 22 PM

abhishek-sankar avatar Jul 26 '20 08:07 abhishek-sankar

@AbhishekS-2099 Can you download https://github.com/microsoft/vscode-cpptools/releases/download/0.29.0/cpptools-osx.vsix and run the "Install from VSIX" command in VS Code?

We don't know what is causing that particular permission denied error.

sean-mcmanus avatar Jul 28 '20 01:07 sean-mcmanus

I tried that, but the error was persistent. I tried running VS Code as a root user and it got fixed. The present extensions work now. I still can't add new extensions though.

abhishek-sankar avatar Jul 28 '20 01:07 abhishek-sankar