Steps to Reproduce:
I have also encountered this problem.
v1.16.1, win7, http_proxy, 32bit or 64bit
If you open the Developer Tools, can you find anything interesting there?
If you open the Shared Process window (F1, Shared Process
), is there anything interesting in those Developer Tools?
XHR failed: : Error: XHR failed: , at XMLHttpRequest.t.xhrRequest.r.TPromise.t.onerror (file:///C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcessMain.js:4:242078)
In the built in developer tools, i get the above error message when i try to install any plugin.
Screenshot below:
I was having this same issue yesterday with every plugin I tried (after a fresh installation of VS Code). Today, with no changes, I am not running into the issue and am able to install plugins. Did something change on the server side?
Version 1.16.0
Commit 787b31c0474e6165390b5a5989c9619e3e16f953
Date 2017-09-06T16:19:37.192Z
Shell 1.7.3
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
OS: Fedora 26
@vinothbabu @dsneddon Check the Developer Tools Network tab, any interesting clue in there?
@modigrv Did something in the service change in the last few days?
@joaomoreno There hasn't been any change in this area. Also, last deployment was on Wednesday, 13th Sept, nothing changed on server after that.
@joaomoreno I don't see anything interesting in network tab, while trying to install the plugin.
@vinothbabu Did you check the Shared Process' Network tab?
I open the Developer Tools Network tab and close it. And it is ok ...
it's wired!
Same problem here when I run VSCode without administrator permissions and try to search for a plugin
Developer Tools Console Log: -1505940233067.log.txt
Also getting this problem. Running VSCode on macOS 10.12.
XHR failed: : Error: XHR failed: , at XMLHttpRequest.t.xhrRequest.r.TPromise.t.onerror (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-browser/sharedProcessMain.js:4:242078)
My Network tab in the Developer Tools is empty after trying to install an extension. Just the error in the Console tab.
I got the same issue on Ubuntu14.04 with code 1.16.1 (behind a proxy), but i cannot find an error in the developer view.
Same issue, but not behind a proxy.
@jrieken Have you seen XHR Failed
before?
No, maybe this is because of resource filtering/blocking @mjbvz added
The content security policy rules general should produce an error message that explicitly states that content has been blocked by the content security policy. #30850 has an example of those failures.
@vinothbabu / @KUGA2 Is the proxy http or https?
In my case, I couldn't load extensions when I was behind a hotel proxy, but when I returned back to my network (where there is NAT but no proxy), it worked just fine.
I know there is at least one person saying that they are getting this error when not behind a proxy, but it does seem like being behind a proxy might be a common theme.
Strangely, I was getting this error when using my mifi device (I've never had the issue previously with previous versions VS Code).
At home on wifi and wired it seems to be working. Hmmn.
I'd agree with the proxy comment I guess, although the mifi bit is definitely weird.
@mjbvz it is a http proxy. And:
// Whether the proxy server certificate should be verified against the list of supplied CAs.
"http.proxyStrictSSL": false,
// The value to send as the 'Proxy-Authorization' header for every network request.
"http.proxyAuthorization": null,
I also found a log now. Maybe this can help you figure this out
i got a solution 👍
go to network proxy setting and turn on "automatic detect" proxy and done
Same error here. js debug window shows nothing. sometimes error disappear after code restart, sometimes persist for days.
Linux, code 1.16.1-1505406497, http proxy (necessary, because of the corporate policy).
proxy log shows no traffic when code should get the extension info.
Today my code on Windows updated, now i get the same error as in my Ubuntu box.
@raj457036 Where is "network proxy setting"?
Go to start menu
Search for network proxy
Click on network proxy setting
Then select automatic proxy detection
Windows 7 -> 8.1
Open network settings
Click on lan settings
Select automatic proxy
And click apply/ok
On linux
Check for the firewall and network access permission to code
Running Windows 10. My proxy settings are set to automatic. Still getting this error.
Failed to load resource: net::ERR_NETWORK_ACCESS_DENIED
/C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:26 XHR failed: : Error: XHR failed:
at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:26:815048)
e.onUnexpectedError @ /C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:26
/C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:9 WARNING: Promise with no error callback:92
/C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:9 Object
marketplace.visualstudio.com/_apis/public/gallery/extensionquery Failed to load resource: net::ERR_NETWORK_ACCESS_DENIED
/C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:25 XHR failed: : Error: XHR failed:
at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:26:815048)
e.doShow @ /C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:25
/C:/Program Files/Microsoft VS Code Insiders/resources/app/out/vs/workbench/workbench.main.js:26 net::ERR_NETWORK_ACCESS_DENIED
Error: net::ERR_NETWORK_ACCESS_DENIED: Error: net::ERR_NETWORK_ACCESS_DENIED
Error: net::ERR_NETWORK_ACCESS_DENIED
at Timeout._onTimeout (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:4:82944)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
I've tried both the stable build and the insiders build. same error on both.
Same issue behind a proxy with code ver 1.17 x64 on win7. But with 1.14 (x86) all is fine.
Tried automatic proxy detecting, but the issue persists.
Nothing appeared on the Developer Tools Network tab when the issue arises.
same issue, behind http proxy
OS Version: Ubuntu 14.04
code --version
1.17.0
be377c0faf7574a59f84940f593a6849f12e4de7
I did some tests
Same problem behind a proxy,doesn't have in previous version.
I'm seeing this, too. I'm using Windows Server 2008 R2, behind a corporate PAC file proxy.
I know VS Code can get to the internet because it was able to download the v1.17.2 installer. However, when doing an XHR connection to the extensions gallery, I get the XHR Failed error, with these errors in the dev tools console:
POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery net::ERR_TUNNEL_CONNECTION_FAILED```
XHR failed: : Error: XHR failed:
at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:29:1010732)
I think (in my case) it's because VS Code sends a different User Agent header when connecting to the extensions marketplace. When downloading updates it's Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.17.2 Chrome/58.0.3029.110 Electron/1.7.7 Safari/537.36
, but when getting extensions it's sending VSCode 1.17.2
- and our proxy doesn't let that through.
Update: When I use Fiddler to change the user agent to Chrome (Win), VSCode can reach the marketplace and install extensions without issue. Should Extensions be using a different user agent to the update checker?
FYI, I am still seeing this issue on Ubuntu 16.04LTS with 1.17.2 and I am not behind a proxy. I cannot for the life of me find the issue, but I did come across this little tidbit:
somemachine@somemachine ~ $ code --install-extension ms-vscode.ruby
Error: self signed certificate in certificate chain
at TLSSocket.
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:188:7)
at TLSSocket._finishInit (_tls_wrap.js:610:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
It will also note that the check for updates menu seems to just hang as if the application has no access to the interwebs. Everything else on my workstation connects just fine and has for some time now.
windows7/vscode 1.7.2 same problem, used a proxy
Still seeing this issue, but came up with a work-around on Ubuntu 16.04LTS based on the following thread:
https://github.com/Microsoft/vscode/issues/22214
Simply modify the Exec value in /usr/share/applications/code.desktop to:
Exec=/usr/share/code/code --unity-launch --ignore-certificate-errors %F
Finally seeing the list of extensions!
My workstation : CentOS Linux release 7.4.1708 (Core)
I add Exec=/usr/share/code/code --unity-launch --ignore-certificate-errors %F in file code.desktop
No work :(
code -version 1.17.2
POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery net::ERR_PROXY_CONNECTION_FAILED
XHR failed: : Error: XHR failed: workbench.main.js:28
at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:29:1010732)
Any solution for Mac? I'm seeing ERR_NAME_NOT_RESOLVED
in the console.
Getting the same issue on CentOS with the latest vscode release. I work in an offline environment and did not have these issues with the previous releases.
As soon as you click the Extensions tab you get "XHR failed:" and a blank extensions window, even though stuff could already be installed. Closing and re-opening the tab then show the installed extensions.
Developer Tools show:
Failed to load resource: net::ERR_NAME_NOT_RESOLVED marketplace.visualstudio.com/...
XHR failed: : Error: XHR failed: at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///usr/share/code/resources/...
CentOS 7 behind a corporate proxy, same problem. Would be really nice to get some workaround.
Version 1.16.1
Commit 27492b6bf3acb0775d82d2f87b25a93490673c6d
Date 2017-09-14T16:26:20.018Z
Shell 1.7.3
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
Same Problem. Tried x86 & x64 build same issue.
I installed 1.18 today.
Same issue! (Ubuntu 16.04 in VM behinde proxy)
Win 7 Native, behinde proxy works
Before i installed the 1.18, i can install extentions without specifying the proxy settings. However, after i specified the proxy settings and installed the 1.18 version, i start to receive XHR failed warnings when i attempt to search for extensions, no matter whether i have specified the proxy settings.
It's strongly suspicious that something changed in 1.18 version.
The same! (Win7 x64, VSCode 1.18)
-- Temp Solution ----
But off the record, you can just open the *.vsix file by using Winzip or WinRAR, and simply extract the "extension" folder and drop it into your "SYSTEM_DRIVE:\USERS\{CURRENT_USER}\.vscode\extensions" folder, done! Then you just refresh (like Show Installed Extensions) and reload it in the extension-view if your vscode is openning.
I also can not install plugin with XHRfailed.And i open Develop tools and select Network tab just see
net::ERR_CONNECTION_TIMED_OUT
messageService.ts:126 XHR failed: : Error: XHR failed:
at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///D:/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:10:1167516)
And i try to open https://marketplace.visualstudio.com/VSCode in the chrome,i can not open this page.I can open other page normally.
I also encounter this issue when trying to install plugins offline
I am also seeing the same issue with lubuntu and VSC version 1.19 latest one.
It seems like 1.19 fixed the problem for me, but the Powershell extension is currently broken as it attempts to connect to the internet during offline installation. @AkashEMC is it failing only on the Powershell extension or is it everything else too?
FWIW I installed 1.19 hoping for a fix, no luck.
Based on an earlier comment I read in this thread, I next ran code under sudo, got the warning "this is a really bad idea plus you are going to need to set the user directory", did so, and found that the problem goes away - extensions are browseable and loadable just fine.
i try to install an extention of chrome but i recieve a message XHR failed and am using Window 10
@Joebass12 hello , I met the same problem. Have you solved it?
My system is also win10, and vscode was downloaded yesterday.
I just want to download a plugin that the HTML file opens in the browser.
@Greyze I am behind proxy, with VSC 1.19 version on Lubuntu and not able to install any extension, and i tried all the available hacks available on internet/google.
This is still an issue.
I cant install plugins. I'm new to coding, I was looking forward to VS Code for web developing.
I'm using Atom now.
Really wish this issue would be resolved soon.
This link wont even open in my browser.
https://marketplace.visualstudio.com/VSCode
I catch the same error.
net::ERR_CONNECTION_TIMED_OUT
But I try to use VSC version 1.17 and it works.
Windows 10 64 bit creators update, fully updated same error with 1.19.2
Reverting to another editor, will check back when VSC is more developed.
Same Issue, how I can fix it.
Just trying Visual Studio Code for the first time. Same problem. Cannot install extensions. XHR Failed. Was looking to suggest this as a tool for some users to write their own scripts, but since I can't even get it to work myself I can't really suggest it to our users. Guess I'm looking for a different tool. (Using Windows 10 creators update and version 1.19.2).
EDIT: Could have been a local network setting; seem to be able to connect now.
Is there no solution in sight?
I have being experiencing this since I can remember.
Using Win10
VStudio version 1.18.1
🔩
I solved this issue uninstalling every 'Microsoft visual c++ redistributable' files that I had on my computer, uninstalling Visual Studio Code and installing it again.
I hope this can help you
+1. dev tool output:
POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery net::ERR_INSECURE_RESPONSE
(anonymous) @ requestService.ts:70
n.Class.derive._oncancel @ winjs.base.raw.js:1641
t.xhrRequest @ requestService.ts:48
(anonymous) @ requestService.ts:51
(anonymous) @ extensionGalleryService.ts:752
g.__generator.a.label @ extensionGalleryService.ts:752
s @ winjs.base.js:11
then @ winjs.base.raw.js:1566
c @ winjs.base.js:11
f @ winjs.base.js:11
n.Class.derive._oncancel @ winjs.base.raw.js:1641
f @ winjs.base.js:11
e.request @ requestService.ts:41
n.request @ requestService.ts:18
(anonymous) @ extensionGalleryService.ts:430
then @ winjs.base.raw.js:1566
e.queryGallery @ extensionGalleryService.ts:421
e.query @ extensionGalleryService.ts:407
(anonymous) @ extensionsWorkbenchService.ts:403
g @ winjs.base.raw.js:1170
enter @ winjs.base.raw.js:852
_run @ winjs.base.raw.js:1068
_completed @ winjs.base.raw.js:1036
g @ winjs.base.raw.js:1170
enter @ winjs.base.raw.js:852
_run @ winjs.base.raw.js:1068
_completed @ winjs.base.raw.js:1036
e.doRequest.n.TPromise.t.handlers.(anonymous function) @ ipc.ts:246
e.onMessage @ ipc.ts:319
(anonymous) @ ipc.ts:206
e.fire @ event.ts:142
(anonymous) @ ipc.net.ts:81
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
10messageService.ts:126 XHR failed: : Error: XHR failed:
at XMLHttpRequest.t.xhrRequest.n.TPromise.t.onerror (file:///D:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4512:647)
Had this issue just after installing and configuring the cmake plugins. Runnig arch on 4.14.15-1-ARCH 64bit. Happens with both the insiders edition and the binary edition in the AUR.
Encountering the same issue as @ashellwig and @vrachels. Is the SSL cert for the marketplace expired?
Navigating to the address https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery shows a privacy error in Chrome. I'm thinking there's an SSL issue.
Just downloaded VS Code from Microsoft's web site and installed it on Fedora 27. I am getting the XHR failed
error as well. Selecting "Toggle Developer Tools" it is clear the VS Code is having problems accessing:
https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
VS Code's Developer Tools pane gives the error:
Failed to load resource: net::ERR_INSECURE_RESPONSE
Accessing the URL with Firefox, I get:
marketplace.visualstudio.com uses an invalid security certificate.
The certificate is not trusted because it is self-signed.
The certificate is not valid for the name marketplace.visualstudio.com.
Error code: SEC_ERROR_UNKNOWN_ISSUER
Looks like a bad certificate.
@pgrahamdev I got the same problem when I tried to download vscode extension , I think the problem is from website certificate was expire
xhr failed i got from windows 10 .today trying to install plugin but prompt xhr failed . how to fix it?
Same.
Kernel: Linux 4.14.15-1-MANJARO
Architecture: x86-64
POST https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery net::ERR_INSECURE_RESPONSE
Error: XHR failed:
at XMLHttpRequest.n.TPromise.t.onerror (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:4512:647)
@ejbravo then I have so much to do.
Reset your network
It will resolve 90% problem
Else
Try to use a VPN it will resolve 100% problem
I am running Lubuntu 14, 64 bits Guest OS under VMware workstation player 14, behind proxy server, i tried to set proxy from VSCode but Extension installations always fails, after setting proxy server at VMware workstation player level, it works smoothly.
Terminate Visual Studio Code , go in terminal and run code --ignore-certificate-errors
to start it ignoring ssl certificates. This solved my problem.
I'm getting an error reported in #48069 that relates to strict SSL verification that m,ust have recently been added, probably via an update of an underlying package/library. Using code --ignore-certificate-errors
didn't solve the unable to get local issuer certificate at TLSSocket
error I was seeing in the Shared Process viewer.
I noticed that the problem with code is related to the network security i.e, ajax request from your device to the server is not protected.
My friend had this problem so i tried two solution :
Vpn solution work for macos, windows and linux too.
Not sure of the proxy as redirecting with a proxy can be risky at eome point.
So use a vpn.
Hope this helps.
I´m getting this issue on Linux Ubuntu 16.07 X86_64 with VSCode 1.27.2 behind corporate proxy with self signed certificate (I do have the CA certification installed but VSCode somehow doesn´t use it). With code --ignore-certificate-errors
it does work again.
when i enter @recommended at extensions ,just one sentence. " We cannot connect to the Extensions Marketpalce at this time, please try again later".who can tell me how to install plugins correctly?
@Leehom23 Starting from version 1.32 I also encounter the same message on Windows 10 behind proxy.
Never had problems, always behind the same proxy, with previous versions of VSCode.
As I said in issue #68843 I'm also unable to search/install extensions inside VSCode behind proxy.
Everything works properly without proxy.
i got same problem and solved it by doing that
Yeah, I agree with @mohamed-mokhtar
You can Also use Cloudflare's DNS
I use VSC 1.37.0
on windows 8.1
I tried the method of @mohamed-mokhtar and it worked <3
Using VSC 1.37.0 on opensuse, it was that automatic dns of network settings (set to gateway ip address) is not handling the VSC domains requests right. After adding google ones as @mohamed-mokhtar did. it worked. but tweaking it in KDE network manager through config file in /etc/NetworkManager/system-connections/ your saved connection edit section [ipv4] to be
[ipv4]
dns=8.8.8.8;8.8.4.4;
dns-search=
ignore-auto-dns=true
method=auto
I was unable to update extensions and after checking Developer Tools I found vscode can't resolve this domain "gallerycdn.vsassets.io" then checked my network connection settings and found it using ISP DNS so I changed it to google DNS "8.8.8.8" and updates are working fine now.
looks like code --ignore-certificate-errors
is no longer an option? vscode 1.39 on mac os x
code --ignore-certificate-errors
Option 'ignore-certificate-errors' is unknown. Ignoring.
Working with me on ubuntu 12.x
after edit reconnect to network
go to Control Panel\Network and Internet\Network Connections
and choose your curently Network and
press on properties
Select " Internet Protocol Version 4 (TCP/IPv4)
At General section click on " Use the following DNS Server address : "
and just make your DNS
Preferred DNS server : 8.8.8.8 "
Alternate DNS server : 8.8.4.4 "
Make setup both IPv4 & IPv6 with different DNS I personally use Cloudflare
you check the setup from here https://1.1.1.1/dns/
worked for me when using VPN and changing the DNS server as above
I have this issue. I don't know anything about coding. I just wanted to learn some python. When I try to install python I just get this:
https://i.imgur.com/AWJbiKo.png
Doing the google dns thing two posts above changes nothing. Same thing vpn on and off.
nevermind, I found that it is possible to install it manually through the vs code marketplace Ctrl+Shift+X. I think...
Still some issues: Unable to open 'Extension: Python': XHR failed.
I can't get this to work. I'll install something else...
sadly, XHR failed again
I have been having this issue for too long now, I could install extensions manually tho but..
I searched about this issue in the past and I still do lately but all I find is that DNS nonsense.
Why do we need to play around our DNS and change it to install extensions or make the program work?!!
I stopped using vscode back then when I had this issue and found that changing DNS is the solution, so I decided to just stop using vscode in the hope that will get fixed in future release.
but here we are now after couple years already and still no permanent fix for it in version 1.49.1 !!
This is weird, even though this might fix the issue (our issue) but it is definitely a bug that has to be fixed internally in vscode, users expect to install the program and see it works without having to miss around with their pc settings or network settings.
I'm a total beginner, I have no clue why it has to be this way or how vscode communicate with whatever to get these extensions, and I know changing DNS is not a big deal, but comon, this is just a work around to make it work, sort of like a hack, we need a fix once and for all.
I really thank you and appreciate your hard work to make such useful program open for everyone, but is it too much to ask for a fix for this?
Code.exe --proxy-server=http://IP_PROXY:8080 --ignore-certificate-errors
The fact that most if not all of us who are working in a company are behind corporate proxy and this problem still haunting up to this day kinda mind boggling me. Sighs...
Most helpful comment
i got same problem and solved it by doing that