Skip to content
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

VS Code XHR failed #170818

Closed
Hussainsmg opened this issue Jan 9, 2023 · 14 comments
Closed

VS Code XHR failed #170818

Hussainsmg opened this issue Jan 9, 2023 · 14 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@Hussainsmg
Copy link

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

  • VS Code Version: 1.74.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Install python extension (or other extensions)

[error] XHR failed,XHR failed,XHR failed,XHR failed,XHR failed: Error: XHR failed,XHR failed,XHR failed,XHR failed,XHR failed
at vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:87:88554
at Array.reduce ()
at u (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:87:88540)
at Z.D (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:87:79894)
at async Z.z (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:87:77428)
at async Z.install (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:89:154420)

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.74.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@Hussainsmg
Copy link
Author

I believe the problem is with the proxy. When I try to install a module, I encounter the following:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', Connection ResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))': /simple/pandas/

@sandy081 sandy081 assigned deepak1556 and chrmarti and unassigned sandy081 Jan 10, 2023
@deepak1556
Copy link
Contributor

Can you start the application with --log-net-log=netlog.json and perform the steps that cause the failing request. Quit the application and attach the generated netlog.json file.

Does the issue repro when you disable the proxy ?

@deepak1556 deepak1556 added the info-needed Issue requires more information from poster label Jan 11, 2023
@Hussainsmg
Copy link
Author

How to open the application with --log-net-log=netlog.json?

@deepak1556
Copy link
Contributor

You need to start the application from a command line, ex: powershell with the above flag. code.cmd --log-net-log=netlog.json

@Hussainsmg
Copy link
Author

You need to start the application from a command line, ex: powershell with the above flag. code.cmd --log-net-log=netlog.json

I did that but I could not find the netlog.json file. Is supposed to be in the same directory as the application or in a different directory?

@deepak1556
Copy link
Contributor

Can you try passing an absolute path instead

@Hussainsmg
Copy link
Author

I got an error: ERROR:network_service_instance_impl.cc(553)

I think it is better to just deal with the problem as if I do not have Internet Access (Offline). I will get all the extensions and packages locally and then install them

@deepak1556
Copy link
Contributor

Can you share a recording of what steps you tried with the command line flag ?

@Hussainsmg
Copy link
Author

Can you share a recording of what steps you tried with the command line flag ?

First I change the directory to the location of visual studio code application and then wrote: code.exe --log-net-log=netlog.json

The second time I wrote: "path" --log-net-log=netlog.json

@Hussainsmg
Copy link
Author

I solved the problem by installing all the extensions (.VSIX) files from the Marketplace and ensuring they were compatible with the VS Code version I have. Then I opened the settings.json and added

"http.proxy":"http://proxyname:port"

It seems like the problem is that VS Code was trying to connect to the internet and was blocked when installing some extensions. This PC is blocked from connecting to some websites (security reasons) and the best way I found was to install the extensions manually.

@deepak1556
Copy link
Contributor

Closing as not actionable per above comment.

@0D1NTR33
Copy link

I have the same issue with XHR Failed

Version: 1.75.1 (user setup)
Commit: 441438a
Date: 2023-02-08T21:32:34.589Z (2 wks ago)
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No

@Christopher-Stevers
Copy link

Having the same issue on a recent install, is there a stable version I can move too?

@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

8 participants