microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

XHR failed when trying to install extensions #128229

Closed sasikiran1998 closed 3 years ago

sasikiran1998 commented 3 years ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

1.XHR failed 2.Not able to see extensions. 3.Every time getting error like " We cannot connect to the extensions marketplace at this time. " Screenshot (624) Screenshot (625)

sandy081 commented 3 years ago

Can you please open dev tools console and see if there are errors related to this? You can run the command Toggle Developer Tools from command pallette to open developer tools.

sasikiran1998 commented 3 years ago

Could You specify what to open more clearly, I am using Windows 10. I did not get where to open dev tools and all. So suggestions are readily accepted..

And for more info: 1.Whenever VS Code is opened, it never shows the extensions. 2.If I try to download from internet also, it always shows message as XHR failed. 3.This issue is not resolved even if i try to uninstall and reinstall VS code again and again. 4.Whever is done, the extensions are never visible and will always throws message as " We cannot connect to the extensions marketplace at this time".

akitakedits commented 3 years ago

Same issue here, before the last update it worked fine and I could browse extensions. I've tried allowing all connections inbound & outbound through Windows Firewall but still nothing.

Edit: Manually installing an extension through command line worked. Example: codium --install-extension icrawl.discord-vscode

sasikiran1998 commented 3 years ago

Ok .. I wil try and update ..

sandy081 commented 3 years ago

To open developer tools, please do following:

@Akitakek I do not think VS Code and Codium are same, so if you are seeing issues with Codium, please file issues against that product.

sasikiran1998 commented 3 years ago

please do find the attachment and help me how to resolve the problem Screenshot (628)

sandy081 commented 3 years ago

@deepak1556 Tunnel Connection Failed - electron / chromium related ?

sasikiran1998 commented 3 years ago

wat needs to be done after i open developer tools, there are many errors and warnings.. suggest me how wil i get the extensions activated in my vs code.. Screenshot (628)

SinTan1729 commented 3 years ago

I'm also having the same error in Manjaro.

deepak1556 commented 3 years ago

ERR_TUNNEL_CONNECTION_FAILED indicates they have a proxy server configured and it either rejects request to the marketplace or some other error at the proxy layer.

@sasikiran1998 couple of things to confirm,

Are you able to access https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-vscode-remote/vsextensions/remote-containers/0.163.2/vspackage from your system browser ? If it works, then try the following. If not then please check your proxy blocks connections to https://marketplace.visualstudio.com/

1) Launch with code --user-data-dir <dir> (fill some absolute value for <dir>) and check if extension search works 2)

sasikiran1998 commented 3 years ago

I have tried your expressions and got the result as mentioned. But this did not solve my issue of getting the extensions, please take a look and specify me how to get the extensions activated.

image image

deepak1556 commented 3 years ago

Are you able to access https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-vscode-remote/vsextensions/remote-containers/0.163.2/vspackage from your system browser ? If not then please check your proxy blocks connections to https://marketplace.visualstudio.com/

Did you try this ?

Also can you attach the generated netlog.json file

sasikiran1998 commented 3 years ago

i tried to access the link : https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-vscode-remote/vsextensions/remote-containers/0.163.2/vspackage

and a VSIX file downloaded.

deepak1556 commented 3 years ago

Thanks for testing, can you provide the netlog file for further debugging.

sasikiran1998 commented 3 years ago

the netlog file is empty I am using Windows 10 No proxy I am on Jio4G wifi network

deepak1556 commented 3 years ago

Based on https://github.com/microsoft/vscode/issues/128229#issuecomment-883974825 the path you have specified is incorrect, it should be code.cmd --log-net-log="C:\Users\sasi\AppData\Local\Programs\Microsoft VS Code\netlog.json"

sasikiran1998 commented 3 years ago

I am getting like tis..

what needs to be done next ?

image

sasikiran1998 commented 3 years ago

Again i am getting the same error:

image

deepak1556 commented 3 years ago

Please share a screen recording of what you tried including the commands used to launch the app, you may find https://gifcap.dev helpful as a browser-based gif recording tool.

sasikiran1998 commented 3 years ago

Plz find the attached video glimpse, and after even after i relaunch the vs code app, the extensions are not working recording

deepak1556 commented 3 years ago

The path should be enclosed in quotes to be parsed correctly. Please follow the steps below to get the log file

These steps will not fix the issue but will provide better logging to understand the issue.

sasikiran1998 commented 3 years ago

I have executed the above said, as the netlog.json file format is not supported here, i have mailed u the file.. what to do next??

deepak1556 commented 3 years ago

Thanks for the log, it shows that a proxy server has been configured.

Screen Shot 2021-07-22 at 11 49 14 PM

You might want to disable Automatic Proxy setup under your system network settings. Closing as issue is not from vscode.

sasikiran1998 commented 3 years ago

image

Even if i have disabled the proxy, i am getting the same issue :

image

deepak1556 commented 3 years ago

Can you start with code --no-proxy-server and check.

sasikiran1998 commented 3 years ago

Still the problem persists

image

deepak1556 commented 3 years ago

Please attach a new netlog by starting with code.cmd --no-proxy-server --log-net-log="C:\Users\sasi\AppData\Local\Programs\Microsoft VS Code\netlog.json"

sasikiran1998 commented 3 years ago

Should i delete the previous one?

sasikiran1998 commented 3 years ago

image

deepak1556 commented 3 years ago

Should i delete the previous one?

No it will be overwritten. You can follow the same steps as https://github.com/microsoft/vscode/issues/128229#issuecomment-885186811 with added --no-proxy-server for the first step. You can zip the netlog.json file and upload to this issue.

sasikiran1998 commented 3 years ago

netlog.zip

sasikiran1998 commented 3 years ago

image netlog.zip

deepak1556 commented 3 years ago

Can you print the values of echo %http_proxy% and echo %https_proxy% from the command prompt. Also can you check if "http.proxy" setting in vscode is not configured ?

Netlog shows you are still using a proxy,

t=1044 [st=  1]   +PROXY_RESOLUTION_SERVICE  [dt=0]
t=1044 [st=  1]      PROXY_RESOLUTION_SERVICE_RESOLVED_PROXY_LIST
                     --> pac_string = "PROXY www.google.com:80"
sasikiran1998 commented 3 years ago

image

sasikiran1998 commented 3 years ago

The extensions are activated. Thus the issue is closed.. image

sasikiran1998 commented 3 years ago

Thanks @deepak1556 for solving this issue