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

Updating C/C++ dependencies... Downloading package Error: connect ETIMEDOUT

Open sherkwast opened this issue 10 years ago • 26 comments

Updating C/C++ dependencies...

Downloading package 'Visual Studio Windows Debugger' Failed at stage: downloadPackages Error: connect ETIMEDOUT xxx.xx.x.xx:xxx

Finished

sherkwast avatar Oct 13 '16 14:10 sherkwast

Are you connected to the internet? The 1st package is 12 MB.

sean-mcmanus avatar Oct 13 '16 16:10 sean-mcmanus

Yes, I am connected to the internet.

sherkwast avatar Oct 13 '16 16:10 sherkwast

Hmm...I'm not reproing it. The URL is https://go.microsoft.com/fwlink/?LinkID=825339 . Are you able to access that?

sean-mcmanus avatar Oct 13 '16 16:10 sean-mcmanus

Yes.And I download a zip file.

sherkwast avatar Oct 13 '16 19:10 sherkwast

Okay, we make an https request to that URL to download the zip...so I'm not sure why it would timeout in VS Code. We read the http.proxy and http.proxyStrictSLL settings from VS Code and possibly the HTTP[S]_PROXY environment variable. I don't think we've gotten other reports of this. ENOENT occurs if there's no connection at all, so it looks like your connection is just really slow and is timing out -- how long does it take before the timeout occurs?

sean-mcmanus avatar Oct 13 '16 19:10 sean-mcmanus

So where should I put the zip file...

sherkwast avatar Oct 13 '16 20:10 sherkwast

Bypassing the download/install is not really recommended. We do other "install" stuff like modify the package.json. However...if you go to the install location Users(user).vscode\extensions\ms-vscode.cpptools-<version> then you can open package.json to see the URLs that have additional downloads you'll need, which are list under the "runtimeDependencies" section. All the downloads go to the that root location. And then to bypass the auto-download you need to add a "install.lock" file there. And if you need to use OpenDebugAD7 debugging (or if you don't want the extension to always run) you can modify the package.json as shown in out/src/main.js rewriteManifest().

sean-mcmanus avatar Oct 13 '16 22:10 sean-mcmanus

After I do these,I can open VS code normal.But When I click debug,only follows :


You may only use the C/C++ Extension for Visual Studio Code with Visual Studio Code, Visual Studio or Xamarin Studio software to help you develop and test your

applications.

and debugger seems not really get into main funtion.

mazhan465 avatar Oct 25 '16 13:10 mazhan465

@Luxios we have released an update that may resolve your download issues. Please reopen if it does not.

pieandcakes avatar Dec 09 '16 01:12 pieandcakes

I got same problem:

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.2xx.1xx: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

I could download https://go.microsoft.com/fwlink/?LinkID=825339 by borwser.

tallplay avatar Aug 02 '17 02:08 tallplay

@tallplay We're still trying to figure out why this is happening. We switched to an "improved" CDN but the results have not improved. If the link works via the browser, it implies there is some problem in our software layer. Or maybe we need to retry/wait more?

sean-mcmanus avatar Aug 02 '17 16:08 sean-mcmanus

@tallplay The 825339 fwlink is old. Looks like you're on 0.12.0? Can you try updating to 0.12.1 or 0.12.2 (when we release it).

sean-mcmanus avatar Aug 02 '17 21:08 sean-mcmanus

I've tried 0.12.2. Same problem:

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.227.41: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

The link in package.json is https://go.microsoft.com/fwlink/?linkid=853251, I could download it too.

Have any manual way to overcome this problem? I'd glad to try. I am looking forward to use the great functions of this extension.

tallplay avatar Aug 03 '17 08:08 tallplay

The guy who is helping us wants to know what country (and preferably city) you are in because that will help him figure out which node is having connection issues. Can you provide that? It looks like our highest number of ETIMEDOUT are coming from China, mostly Shanghai and Beijing.

As a workaround, you can open the package.json in our extension folder, look at the runtimeDependencies section and change all the fwlinks to the targets of the fwlinks (since the ETIMEDOUT is occurring on the fwlink), such as https://download.visualstudio.microsoft.com/download/pr/11025398/720d3484d8477614d89ff7a92c6fb1ee/Bin_Windows.zip (for the 853251 fwlink), and also https://download.visualstudio.microsoft.com/download/pr/11008322/220fcbe64419383a9fb722a4cdab5a92/LLVM_Windows.zip for 848957 and https://download.visualstudio.microsoft.com/download/pr/11008322/220fcbe64419383a9fb722a4cdab5a92/Microsoft.VisualStudio.VsDbg.zip for 852926.

If bypassing the fwlinks doesn't work, can you give us the error you receive? Then you could try another workaround by download the zip files using your browser, and then unzip them into the extension folder and add a install.lock file to prevent additional downloads. You might hit some issues with this though, because it skips some "install" steps we do.

sean-mcmanus avatar Aug 03 '17 19:08 sean-mcmanus

I am in WuHan in china .

mazhan465 avatar Aug 04 '17 02:08 mazhan465

I am in ShenZhen in China.

Yensan avatar Aug 04 '17 07:08 Yensan

I have updated to 1.14.2 then

_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.58.152.144: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

I have downloaded the file. Can you tell me( and other guys) how to install it by hand? Appreciate it!

Yensan avatar Aug 04 '17 07:08 Yensan

Now I can update normally.I don't know what about happen.Since one month after,it haven't happen.

mazhan465 avatar Aug 04 '17 08:08 mazhan465

@mazhan465 We switched to a new CDN that reportedly works better in China, although our telemetry hasn't shown an improvement yet. @Yensan You're failing to get results back from the fwlink (located in Massachusetts). Can you try replacing the fwlink with the actual target URL (which I gave above).

sean-mcmanus avatar Aug 04 '17 21:08 sean-mcmanus

@sean-mcmanus I did have replaced the fwlink with the actual target URL (which you gave above), and, there is nothing changed. Could you tell me how to install by hand?

Yensan avatar Aug 07 '17 07:08 Yensan