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

C/C++ extensions fail to install #694

Closed
egamma opened this issue May 5, 2017 · 31 comments
Closed

C/C++ extensions fail to install #694

egamma opened this issue May 5, 2017 · 31 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service

Comments

@egamma
Copy link
Member

egamma commented May 5, 2017

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

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

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented May 5, 2017

@csteres-cpi We don't know yet why you're experiencing download/install failures, and a significant amount of other users are failing as well, so it's something we need to investigate more or provide some additional bundled .vsix link. However, the language server processes for C++ won't run on 32-bit Linux, so our extension wouldn't work for you even if you did download it successfully, unless you only intend to use the debugger.

@jd-carroll
Copy link

Also getting the same error:

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

Windows 7 64-bit

@mokugyos
Copy link

mokugyos commented Jun 4, 2017

I got the same error.

vscode: 1.12.2
windows 10 x64 version 1703

Updating C/C++ dependencies...

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

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

Finished

@holdjun
Copy link

holdjun commented Jun 6, 2017

Updating C/C++ dependencies...

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

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

Finished

me too

@matthew6868
Copy link

Updating C/C++ dependencies...
Downloading package 'C/C++ language components (Windows)' (4663 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (905 KB) .................... Done!
Downloading package 'Visual Studio Windows Debugger' (12081 KB) .................... Done!

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

Finished

I also face this error. This error show every time the VSCode startup.

@99hgz
Copy link

99hgz commented Jun 7, 2017

Updating C/C++ dependencies...

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

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

Finished

me too

@refparo
Copy link

refparo commented Jun 14, 2017

Updating C/C++ dependencies...

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

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

Finished

me too

@iuuniang
Copy link

Updating C/C++ dependencies...

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

Installing package 'C/C++ language components (Windows)'
Warning: File 'C:\Users\iuuni.vscode\extensions\ms-vscode.cpptools-0.11.4\bin\Microsoft.VSCode.CPP.Extension.exe' already exists and was not updated.
Failed at stage: installPackages
Error: invalid local file header signature: 0x16d537e7

Finished

@zhu-xiaoming
Copy link

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Windows)' (4922 KB) ............. Failed. Retrying...(4922 KB) .................... Done!
Downloading package 'ClangFormat (Windows)' (905 KB) .................... Done!
Downloading package 'Visual Studio Windows Debugger' (12081 KB) .................... Done!

Installing package 'C/C++ language components (Windows)'
Failed at stage: installPackages
Error: invalid central directory file header signature: 0x3411450a

Finished

@Anywhere-anyway
Copy link

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: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:572:26)

Finished

@sean-mcmanus
Copy link
Collaborator

The failure rate from these download errors is pretty low and some people report it working after retrying later, but we're still not sure why users are hitting this and we're investigating using different download mechanisms to improve the success rate.

@tallplay
Copy link

I've same problem for days.....

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 104.115.242.199:443
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)

Finished

@diiiego83
Copy link

Updating C/C++ dependencies...

Downloading package 'C/C++ language components (Linux)' (7208 KB) .................... Done!
Downloading package 'ClangFormat (Linux)' (770 KB) .................... Done!
Downloading package 'Mono Framework Assemblies' (4751 KB) .................... Failed. Retrying...(4751 KB) .................... Failed. Retrying...(4751 KB) .................... Done!
Downloading package 'Mono Runtime (Linux / x86_64)' (1450 KB) .................... Done!

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

Finished

@mahaicheng
Copy link

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 23.219.34.138: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)

Finished installing dependencies

@kaarrot
Copy link

kaarrot commented Nov 18, 2017

If the extension is installed offline (using vsix) what are the steps to update the language components?

@sean-mcmanus
Copy link
Collaborator

@kubaroth It's not recommended to install the .vsix offline. You should install the .vsix online with a machine with a matching OS and then zip/tar the installed folder and unzip the installed folder to the extensions folder on the offline machine. Are you able to do that? If not, you'd need to open the package.json to find all the runtimeDependencies you need to manually download and unzip into the extension folder on the target machine and then add an install.lock file and maybe chmod to make the binary files executable.

@kaarrot
Copy link

kaarrot commented Nov 18, 2017

Thanks, I did try the latter - manual download but I had no luck. As I'm still not familiar with the process I wasn't sure if all the dependencies should be copied in the ./bin directory. Does the package.json specifies the exact destination?
I will try the former solution as well, but I'm afraid It may not work as the offline machine runs different Linux distro.

@sean-mcmanus
Copy link
Collaborator

@kubaroth The files should be unzipped into the main extension directory. The zip files have the folders inside them already, such as bin. Different Linux distros should be acceptable for the 1st solution as long as the bitness matches.

@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label Nov 28, 2017
@sean-mcmanus
Copy link
Collaborator

@csteres-cpi We're shipping a offline .vsix option with all the OS dependencies pre-included with our next update (0.14.4) so people can just download/install that if they're having problems downloading/installing the dependencies via the "online" installer. We're using #298 to track that.

@sean-mcmanus
Copy link
Collaborator

Fixed with 0.14.4. Offline installers are at https://github.com/Microsoft/vscode-cpptools/releases .

@valkuzn
Copy link

valkuzn commented Jan 21, 2018

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.

@sean-mcmanus
Copy link
Collaborator

@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?

@valkuzn
Copy link

valkuzn commented Jan 22, 2018

@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.

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Jan 22, 2018

@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.

@jellydengjiali
Copy link

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

@sean-mcmanus
Copy link
Collaborator

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

@dpkristensen
Copy link

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.

@Gan-Jason
Copy link

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.

@abhishek-sankar
Copy link

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

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Jul 28, 2020

@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.

@abhishek-sankar
Copy link

abhishek-sankar commented Jul 28, 2020

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.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests