-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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++ dependencies cannot be downloaded (PROXY) #3335
Comments
The VS Code Marketplace hosts our extension VSIX in a location different from where the dependencies are downloaded. There could be a proxy configuration issue here. If you are able to help us out, I can show you what code needs to be debugged (here) and perhaps we can discover what the proxy issue is. Otherwise, you can download an all-inclusive VSIX package from the link above (https://github.com/Microsoft/vscode-cpptools/releases) |
I have tried installing the recommended VSIX, but I still get the download errors every time I launch Code. |
I'm not able to repro the bug. I successfully download https://github.com/Microsoft/vscode-cpptools/releases/download/0.22.1/cpptools-win32.vsix, disconnect from the internet, and then install it offline. Which vsix did you try? |
I am dealing with the 64-bit Linux version of Code. I tried this process:
1. Uninstall the extension (restart Code)
2. Unplug from the network
3. Install the previously downloaded .vsix file (cpptools-linux.vsix) via
"Extensions: Install from VSIX..."
4. Restart Code
The extension shows up as installed, but each time I launch Code I get the
download failures mentioned in this issue. Of course, I've reconnected the
network by this time.
…On Tue, Mar 26, 2019 at 4:10 PM Sean McManus ***@***.***> wrote:
I'm not able to repro the bug. I successfully download
https://github.com/Microsoft/vscode-cpptools/releases/download/0.22.1/cpptools-win32.vsix,
disconnect from the internet, and then install it offline. Which vsix did
you try?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3335 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEIaVkAAnIqkuMTTY4VeEvvlFvLidL3Qks5vaoy-gaJpZM4cA5CV>
.
|
@rrysolutions Yeah, I tried those same steps and it works for me. Our source code that does this downloading is all in our open source repo: https://github.com/Microsoft/vscode-cpptools/tree/release . The code just checks for an install.lock file, which is bundled in the offline vsix. So something must be causing the install.lock file to not exist. If you can do your repro and look for what is going on with the install.lock file that could help. The C/C++ output pane is just supposed to output "Finished installing dependencies" and not try to re-download dependencies that are already bundled in the vsix. |
@bobbrow Sorry for the late answer.
Please let me know what exactly to debug. I didn't do any debugging inside VSCode. Maybe a short instruction would be good. |
These are the instructions to build and run the extension: https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Building%20the%20Extension.md Before pressing F5 to launch the extension, set a breakpoint here: https://github.com/Microsoft/vscode-cpptools/blob/088276b4aff76e728396300df5b756e3b417073a/Extension/src/common.ts#L378 If you have any questions, or if the guide seems unclear, please let me know. Thank you! |
My problem has been solved. I uninstalled the extension via VSCode, exited
VSCode, and then deleted the entire directory
~/.vscode/extensions/ms-vscode.cpptools-0.22.0. Then when the "Install from
VSIX" command is used the extension is installed with the install.lock file
as expected and it no longer complains about not being able to download
dependencies.
Thank you very much for your support.
Best regards,
Ric
…On Tue, Apr 2, 2019 at 11:01 AM Bob Brown ***@***.***> wrote:
These are the instructions to build and run the extension:
https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Building%20the%20Extension.md
Before pressing F5 to launch the extension, set a breakpoint here:
https://github.com/Microsoft/vscode-cpptools/blob/088276b4aff76e728396300df5b756e3b417073a/Extension/src/common.ts#L378
If you have any questions, or if the guide seems unclear, please let me
know.
Thank you!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3335 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEIaVmGKV9MBwP-Btfg6p5mFCRap4kp2ks5vc37DgaJpZM4cA5CV>
.
|
I spoke too soon. After some time, the problem is back again. The
install.lock file is gone so it's trying and failing to install the
dependencies again. Somehow they're getting deleted. I checked the
directory size when it was working and it was 51M, now it's 7M. It was nice
while it lasted.
Ric
…On Tue, Apr 2, 2019 at 11:28 AM Ric Yeates ***@***.***> wrote:
My problem has been solved. I uninstalled the extension via VSCode, exited
VSCode, and then deleted the entire directory
~/.vscode/extensions/ms-vscode.cpptools-0.22.0. Then when the "Install from
VSIX" command is used the extension is installed with the install.lock file
as expected and it no longer complains about not being able to download
dependencies.
Thank you very much for your support.
Best regards,
Ric
On Tue, Apr 2, 2019 at 11:01 AM Bob Brown ***@***.***>
wrote:
> These are the instructions to build and run the extension:
> https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Building%20the%20Extension.md
>
> Before pressing F5 to launch the extension, set a breakpoint here:
> https://github.com/Microsoft/vscode-cpptools/blob/088276b4aff76e728396300df5b756e3b417073a/Extension/src/common.ts#L378
>
> If you have any questions, or if the guide seems unclear, please let me
> know.
>
> Thank you!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#3335 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AEIaVmGKV9MBwP-Btfg6p5mFCRap4kp2ks5vc37DgaJpZM4cA5CV>
> .
>
|
@rrysolutions Are you using 0.22.1? We don't have any code that deletes the install.lock, so it must be VS Code itself that is doing it (or some other external process), possibly it's trying to uninstall the extension and install a newer version 0.22.1. |
@rrysolutions It sounds like VS Code auto-updated you to 0.22.1 leaving you in some bad state. You should set the extensions.autoUpdate setting to false. We've thought about possibly defaulting the setting to false for users who install the offline vsix, but that would impact all extensions, so we're not sure about that change. |
Yes, that's exactly what's happening. The VSIX file installs version
0.22.0. Then, when it checks for the latest version it tries to install
0.22.1 the normal way, which doesn't work for me.
I have turned off automatic extension updates to correct this problem for
me (Fun fact: I have not less than 7 different instances of Code, using
different user data directories, so shutting it off was a bit of a chore!
:-)).
I guess I'm satisfied enough with this work-around, as long as any new,
spiffy updates offer a new VSIX for me to install...
Best regards,
Ric
…On Tue, Apr 2, 2019 at 3:46 PM Sean McManus ***@***.***> wrote:
@rrysolutions <https://github.com/rrysolutions> Are you using 0.22.1? We
don't have any code that deletes the install.lock, so it must be VS Code
itself that is doing it (or some other external process), possibly it's
trying to uninstall the extension and install a newer version 0.22.1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3335 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEIaVrPVWgE7tomWj5I-iab3r0gaRKQWks5vc8GagaJpZM4cA5CV>
.
|
Hi @bobbrow
|
The out/src/main.js should be generated as part of the TypeScript compilation when you do Launch Extension. Do you see that file generated? |
@sean-mcmanus No, the file isn't there. There is no out directory at all. |
Hmm, I'm not sure what's going on. Did you try doing a Reload Window? Sometimes that fixes issues like this. Or do you see any errors via Toggle Developer Tools? Maybe run "npm update" too? @michelleangela @Colengms Any ideas? |
Output of "npm install":
|
Today I tried "npm install" on a different machine. With same results. Any hints on how to proceed with this? |
@FerhatAkgun The npm install output looks fine. Downloading via zip should be okay as long as the files are unzip afterwards. Are you using the "Launch Extension" button? Do you see any errors in the Toggle Developer Tools? |
@bobbrow @sean-mcmanus getHttpsProxyAgent returns:
Right after that we go back to DownloadFile.
Pleas let me know, what else you need. |
@FerhatAkgun Have you tried the offline installer? Have you tried setting your C_Cpp.updateChannel to "Insiders"? That also does down a different download path and will automatically retry with http.proxySupport set to "off". We are not reading/using the http.proxyAuthorization setting when we make our http request, so it's possible that might be the bug. We don't currently have time to investigate this proxy scenario, but you could try changing the code to use something like:
and see if that works for you. |
@sean-mcmanus Yes of course. The offline installer is working but this behavior using the "normal" way is obviously a bug. Even using the offline installer will cause a problem with every new release. Visual Studio Code will try to update the extension. First part of updating will be fine and the second part (downloading the dependencies) will fail again and this will cause a non working state. I have placed your code snippet inside getHttpsProxyAgent. Anyway I have entered the setting "http.proxyAuthorization" into user settings with the value "Basic Base64OF(USER:PASSWORD)" |
Update: |
So are you saying you think we have a bug we should fix? Or is setting the http.proxy as described a sufficient workaround? You can also change the extensions.autoUpdate setting to false to avoid auto-updating the offline vsix. |
Regarding the off-line VSIX, how often is that updated? Is one stuck at and
old version?
Just wondering, not a huge deal?
Ric
…On Tue, Apr 16, 2019, 5:44 PM Sean McManus ***@***.***> wrote:
So are you saying you think we have a bug we should fix? Or is setting the
http.proxy as described a sufficient workaround?
You can also change the extensions.autoUpdate setting to false to avoid
auto-updating the offline vsix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3335 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEIaVuzo6iMrft1capxToYm-ZLiHQ16oks5vhlJpgaJpZM4cA5CV>
.
|
@sean-mcmanus Reason: |
@rrysolutions Every release has an offline vsix for it. |
Switching C_Cpp.updateChannel to "Insiders" doesn't change anything. It still can't download the dependencies. |
@FerhatAkgun If the Insiders or offline vsix is used, then it shouldn't be downloading any dependencies because those vsix's have an install.lock file that we check (assuming you're not running the extension from the TypeScript source). @rrysolutions was saying that the install.lock file was getting deleted for some reason. |
Any updates on this issues? |
@resk8 It hasn't been resolved, but I heard that there will be "external changes" that are expected to enable our extension to fix this in the coming months (July?) -- I'm not sure if the change is publically disclosed though so I can't give more info, unless @bobbrow can find where he heard about it. |
It's this issue: microsoft/vscode#23251. It sounds like they plan to enable this soon, but I haven't confirmed with them as to whether they are on track to deliver it this month or not. When this goes live we will no longer need to download our dependencies anymore. |
any updates on this? i cant install the newer vscode without having the C++ extension broken when downloading through a proxy |
@resk8 No update yet. I asked the VS Code team for an update at microsoft/vscode#23251 . |
I disabled the Strict SSL in the File -> Preferences -> Settings, Problem solved! |
I'm currently getting this on Ubuntu 16.04, and @amithrc 's fix didn't work. |
Letting all the downloads fail tells you to download a version with all the dependencies from the releases page. Getting a |
When I open a simple C++ folder (helloworld.cpp from the tutorial) recently, I get three VS Code popups:
They all fail. When I originally installed CTRL+SHIFT+B does build a project, but trying to run or debug the code only produces the message "The C/C++ extension is still installing. See the output window for more information." The contents of the output window are below. This all will begin again if I close and reopen VS Code. Does anyone know how to stop this happening?
|
With help from here I was able to get past the problem by downloading the latest version of the dependency cpptools-win32.vsix (which is also the correct option for 64-bit), and installing the package within VS Code via:
|
Regarding proxy configuration, this extension currently tries to download https://go.microsoft.com/fwlink/?linkid=2143240 which redirects to https://download.visualstudio.microsoft.com/download/pr/ebeeef98-9fc6-4e24-8db3-1820882eacb4/d3ade0063f4613e9f9556d6f1fa8f056/bin_linux.zip In our org we used the guidance on https://code.visualstudio.com/docs/setup/network for configuring our proxy, however download.visualstudio.microsoft.com is not on that list of common hostnames. |
Add download.visualstudio.microsoft.com to the list of hostnames to allow through a firewall. See microsoft/vscode-cpptools#3335 (comment) .
@jrray Thanks for letting us know. I've created a PR to add download.visualstudio.microsoft.com to the list: microsoft/vscode-docs#4036 |
This also seems related to microsoft/vscode#12588. If the cpptools extension could use an extension API to do this download workaround using Chromium's network stack, it would use the same proxy rules that the rest of VS Code does. |
This will no longer be a problem in version 1.8.0 when all dependencies are bundled with the VSIX per platform. #8152 is the issue tracking that implementation. |
Type: General
Input information below
Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.
Describe the bug
OS and Version: Windows 10
VS Code Version:
Version: 1.32.3 (user setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.14393
C/C++ Extension Version: 0.22.0
Other extensions you installed (and if the issue persists after disabling them):
Bookmarks, C/C++ Snippets, C++ Intellisense, Code Runner, SVN,
I am able to access the internet right after typing my proxy credentials. Vscode is able to download the new C/C++ extension. Right after that it asks me to reload.
Right after reloading it tries to get some dependencies, which cannot be downloaded. See below:
The text was updated successfully, but these errors were encountered: