Reputation: 10400
I raised this as an issue on the VSCode github
I just installed Visual Studio Code
to try it out, but I ran into a problem almost immediately when trying to install any extension (following this).
After pressing ctrl + p
or F1
and then typing Extension
and selecting Install
, the program appears to search for a while. However, after a few seconds to a minute I see this error:
Error getaddrinfo ENOTFOUND marketplace.visualstudio.com marketplace.visualstudio.com:443
And if I click out of the window before this message appears:
Error socket hang up
Has anyone else seen the same error and managed to overcome?
As mentioned in the comments, this seems to be discussed here. However, I can't apply any of the suggested fixes:
Changing .host
to .hostname
in the file src/vs/workbench/node/proxy.ts
: I can't find this file on my system.
Changing the same (.host
to .hostname
) in the file C:\Program Files (x86)\Microsoft VS Code\resources\app\out\vs\workbench\electron-main\sharedProcessMain.js
: I can't find the folder electron-main
or the file sharedProcessMain.js
on my machine.
Changing SSLStrict
to true
Upvotes: 9
Views: 68966
Reputation: 9135
If you have not set any proxy Or might have issue with credentials
// file : settings.json
{
// comment below line or change according to your credentials
// "http.proxy": "http://username:password@hostname:port/",
"http.proxyAuthorization": null,
// make it false
"http.proxyStrictSSL": false,
}
Upvotes: 0
Reputation: 1
I once had this experience. Uninstall and reinstalling/updating Vs code simply fixed the error. https://code.visualstudio.com/download
Upvotes: 0
Reputation: 1
I was getting the message that 'error while installing extension..' in Visual Studio Code. I solved it by following these steps
1- Go to Environment Variables > System Variables 2- Click on Path 3- Click on New 4- Paste the location of the Visual Studio Code (For me it is C:\Users\PC\AppData\Local\Programs\Microsoft VS Code) 5- Click OK
Hope, it will fix the problem.
Upvotes: 0
Reputation: 47570
I had to remove defaultproxy from devenv.exe.config to get rid of forbidden 403 error.
Deleting this section from devenv.exe.config sorted my issue.
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy bypassonlocal="True" proxyaddress=xxxxx/>
</defaultProxy>
C:\Users\xxxx\AppData\Local\Microsoft\VisualStudio\17.xxxxx \devenv.exe.config
Upvotes: 0
Reputation: 332
You need to enable http.proxySupport
so your WSL instance can talk over proxy
CTRL+SHIFT+P or CMD+SHIFT+P
Find: Preferences: Open Settings JSON
and add the following line to your settings:
"http.proxySupport": "on"
you may also need to change your DNS in /etc/resolv.conf
:
sudo vi /etc/resolv.conf
and change the nameserver to:
nameserver: 8.8.8.8
Et Voila!
Upvotes: 0
Reputation: 69
Firstly, make sure if you have installed any extensions before (by typing @installed in the extensions panel) if haven't installed anything yet try deleting all the files this location C:\Users\SYS_NAME.vscode\extensions. Restart the vscode.
Upvotes: 0
Reputation: 10400
I was able to install some extensions after my network admin disabled SSL Inspection on my machine.
This is not ideal as I wouldn't want this turned off for everything.
After re-enabling inspection, I set my User Settings
to
"http.proxyStrictSSL": true
I am still unable to download packages, but this does appear to be the problem.
Upvotes: 4