visual-studio-codesshvscode-extensionsmarketplace

"XHR failed" can't download any extension


So recently I get this error "XHR failed" while trying to download extension and I already try a lot of things changing the setting but still it can't work. So I decided to try difference Wi-Fi (mySchool) and network (mobile data) and I'm shocked it's working fine. So, I guess the problem is on my own Wi-Fi. How to deal with it?

I use the latest VS CODE version on Windows 11.

I try a lot of things to fix it and been through GitHub and Stack Overflow too from proxy setting, firewall, DNS, restart router, restart laptop. Also I tried everything in this question too and all but

"XHR failed"

keeps appear and as I said before without changing any setting but only changing Wi-Fi it works fine. So, I hope there's a solution on my Wi-Fi.

enter image description here

this is the error msgs on therminal: enter image description here


Updates:

  1. I'm running the same project at home and school.

    I'm using the same laptop at home and school

  2. By "mobile data", I mean hotspot from my cell service (vs. Wi-Fi).

  3. The projects ONLY works for Wi-Fi at school and from my hotspot.

    It does NOT work from my home Wi-Fi.

  4. It fails not only for remote explorer, but the other ones too.

    I can't try to reload the extension that I want to download. The error always occurs, not only on Remote Explorer.

  5. The other problem is "can't connect to discord via RPC: Error: could not connect"


Solution

  • I found the solution for my problems. it solved by using vpn. the problem was my wifi provider probably blocking the request on vs code, seems like there's something fishy about the DNS policy.