Error while fetching extensions xhr failed ошибка

This problem started a few weeks ago, when I started using NordVPN on my laptop.
When I try to search for an extension and even when trying to download through the marketplace I get this error:
enter image description here

EDIT: Just noticed another thing that might indicate to what’s causing the issue. When I open VSCode and go to developer tools I get this error messege (before even doing anything):

«(node:19368) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(Use Code --trace-deprecation ... to show where the warning was created)»

The only partial solution I found so far was to manually download and install extensions.

I’ve checked similar question here and in other places online, but I didn’t find a way to fix this. So far I’ve tried:

  1. Flushing my DNS cache and setting it to google’s DNS server.
  2. Disabling the VPN on my laptop and restarting VS Code.
  3. Clearing the Extension search results.
  4. Disabling all the extensions currently running.

I’m using a laptop running Windows 10. Any other possible solutions I haven’t tried?

asked Nov 30, 2021 at 23:08

RONOLULU's user avatar

RONOLULURONOLULU

6571 gold badge4 silver badges12 bronze badges

5

I had the same problem, I did the following steps to solve it

All you need to do is enter to the JSON settings file from VSC

1. Press F1
2. Type User Settings
3. Search for Proxy
4. In proxy section, look for the title `Http: Proxy Authorization`
5. Click on 'Edit in settings.json'
6. Delete all brackets containing proxy data
7. Save JSON file

After that, just restart VSC
You can also find the JSON in %appdata%/Code/User/settings.json

answered Feb 2, 2022 at 5:53

Binjie Liang's user avatar

9

so i find this

  1. press f1
  2. search user setting
  3. click enter
  4. search on user setting » proxy «
  5. click enter
  6. look for «use the proxy support for extensions.»
  7. change override to on

maybe this can help you.

Aristide's user avatar

Aristide

3,5262 gold badges29 silver badges50 bronze badges

answered Mar 13, 2022 at 12:38

Melon's user avatar

MelonMelon

3513 silver badges2 bronze badges

3

For me , ‘XHR failed’ error appears when the proxy settings between your PC system and vs code are conflict.

1.Check PC system proxy settings.

2.Open cmd or terminal, type

echo %http_proxy%, if any output, make sure it fits your pc proxy setting. Because if the proxy on vs code not being set, will be inherited from the http_proxy and https_proxy environment variables.

3.If none, open vs code settings.json , add
"http.proxy":"http://proxyname:port" that fits your pc proxy setting ,without a trailing slash.

Try download extensions again.Hope this helps. ^^

answered Feb 7, 2022 at 8:08

noy L's user avatar

noy Lnoy L

3942 silver badges5 bronze badges

1

I don’t use a proxy, and I do use NextDNS so I didn’t want to change my DNS settings.

As a workaround, you can open code with --ignore-certificate-errors flag, install any extensions, then restart without the flag.

On windows:

code --ignore-certificate-errors

answered Aug 15, 2022 at 5:29

Lewy Blue's user avatar

Lewy BlueLewy Blue

4023 silver badges13 bronze badges

0

Simply follow below steps:

  1. Press F1
  2. Type User Settings
  3. Search for «Proxy Authorization»
  4. Click on «Edit in settings.json»
  5. Add new key value pair — «http.proxySupport»: «on»
  6. Save JSON file

At my end settings.json file

{
    "http.proxyAuthorization": null,
    "http.proxySupport": "on"
}

answered Dec 6, 2022 at 5:28

Akash Darji's user avatar

0

In my case, the solution was to remove HTTPS_PROXY (Could be HTTP_PROXY) environment variable set during terminal initialisations.

Environment variables can be confirmed by env command for most operating systems.

I removed the line which sets the environment variable for proxy from the bash profile, then restarted the OS.

Apart from ~/.bashrc for bash or any other sh-compatible shell, the environment variable could be in:

  • /etc/environment: specifically meant for environment variables
  • /etc/env.d/*: environment variables, split in multiple files
  • /etc/profile: all types of initialization scripts
  • /etc/profile.d/*: initialization scripts
  • /etc/bashrc, /etc/bash.bashrc: meant for functions and aliases
  • ~/.bash_profile: initialization for login (bash-)shells
  • ~/.bashrc: initialization for all interactive (bash-)shells
  • ~/.profile: used for all shells
  • ~/.cshrc, ~/.zshrc, ~/.tcshrc: similar for non-bash shells

Credit to this post.
https://unix.stackexchange.com/a/249922

The environment variable HTTP(S)_PROXY may be used by other applications. Therefore, be aware of the side effects of removing it.

answered Feb 7, 2022 at 11:51

snowpeak's user avatar

snowpeaksnowpeak

7689 silver badges25 bronze badges

1

December 10,2021.
I’m using vscode with ubuntu 20.04.
I came across the XHR errors from yesterday and could not install any extensions.
Googled a lot but nothing works.
Eventually I downloaded and installed the newest version of VSCode(deb version) and everything is fine now.
(I don’t know why but maybe you can give it a try! Good Luck!)

Chirag Kothiya's user avatar

answered Dec 9, 2021 at 17:48

森林虎猫's user avatar

森林虎猫森林虎猫

911 silver badge4 bronze badges

2

I got the same error with the .deb version from the visualstudio.com page.

Have you tried opening the Developer Tools (F1, Developer Tools). Which error is returned?
I had ERR_CERT_AUTHORITY_INVALID. The —ignore-certificate-errors command-line flag is a workaround for me (as indicated here https://code.visualstudio.com/docs/setup/network).

answered Dec 14, 2021 at 11:48

diaph's user avatar

diaphdiaph

215 bronze badges

2

As far as I am aware the XHR error has several possible causes. The easiest fix which should be attempted prior to more complicated methods is restarting VS Code.

I have seen this error a couple of times and have been able to resolve it this way, for me it was not related to proxy settings, whereas for other users it might be. A possible relevant scenario is running a VS Code instance without restart or update over prolongued periods of time, such as days or even weeks.

answered May 5, 2022 at 10:06

Koenigsberg's user avatar

KoenigsbergKoenigsberg

1,7181 gold badge10 silver badges22 bronze badges

For me i had to disable this option from Visual Studio Code.

For me i had to disable this option from Visual Studio Code.

answered Aug 28, 2022 at 4:18

Sukh's user avatar

SukhSukh

4225 silver badges14 bronze badges

In my case http_proxy system environment variable was set in Windows 10. After deleting that VS code started loading extensions.

answered Sep 3, 2022 at 9:10

iAviator's user avatar

iAviatoriAviator

1,27013 silver badges30 bronze badges

In my case, just only sign in with Microsoft Account works for me according to Drew Kimani comment on this question.

  1. Open VS Code, click profile logo then click Turn On Cloud Changes
    step 1

  2. Choose Sign In with Microsoft and follow the next steps.
    step 2

After done, it will resolve this problem.

answered Mar 22 at 5:09

Jordy's user avatar

JordyJordy

1,8122 gold badges6 silver badges24 bronze badges

0

I’m using windows 11 and I was having the same issue.
My laptop has a Killer wifi board and it comes with a option to «enable game fast». It was checked to start automatically with a game. I just unchecked it and this error stopped to show up.

I hope your problem will be easy as mine to solve. Try maybe your firewall.

Dharman's user avatar

Dharman

30.4k22 gold badges84 silver badges132 bronze badges

answered Jan 24, 2022 at 22:06

Vinicius's user avatar

ViniciusVinicius

211 silver badge2 bronze badges

I have faced the same issue. And I delete the .vscode-server directory in server. Reconnect my server successful.

answered Sep 16, 2022 at 2:23

cyicz123's user avatar

cyicz123cyicz123

351 silver badge5 bronze badges

Running Windows 11, it is Windows Firewall preventing it.

  1. Open Windows Security
  2. Click on Firewall & Network Security
  3. Click on Allow an app through the firewall
  4. Click on Change Settings
  5. Click on Allow Another App
  6. Browse to where VS Code is installed and click on Code.exe
  7. Make sure that Code shows in the list of the allowable apps

And that is it

Hope it works with you as well.

S.

answered Nov 2, 2022 at 13:53

Sami Tarazi's user avatar

I had the same issue .. it’s a very specific solution that worked for me but I hope it helps someone who will pass by here in the future:

Apparently .. I disconnected Cloudflare Zero Trust «Warp 1.1.1.1» in the CLI by mistake and some applications (vscode,firefox,skype ..) were using it .. so all I had to do was reconnect .. if your warp tray icon doesn’t work like mine then all you have to do is type the command:

warp-cli connect

And all was back to working.

answered Dec 11, 2022 at 11:41

Lotfi's user avatar

LotfiLotfi

1911 silver badge14 bronze badges

I faced the same problem, however no proxy or VPN.
Solved it by entirely erasing my vscode config folders: %appdata%Code and %userprofile%.vscode. (As explained in https://stackoverflow.com/a/75473624/2381133.)

answered Feb 16 at 14:26

JanFrederik's user avatar

JanFrederikJanFrederik

5304 silver badges7 bronze badges

1

Following worked for me :

  • press f1
  • search user setting
  • click enter search on user setting » proxy «
  • click enter
  • remove the value present in «Http: Proxy»

answered Mar 11 at 12:16

IKriKan's user avatar

IKriKanIKriKan

1,05112 silver badges12 bronze badges

I faced this problem in 7-2022, and it’s gone without even restart vscode.
The reason was poor internet connection. If this is ur situation check the quality of your internet connection and just click refresh button, then extensions appear after a moment!

answered Jul 7, 2022 at 7:55

Bashar Issa's user avatar

Bashar IssaBashar Issa

1012 silver badges4 bronze badges

In my Windows machine deleting http_proxy User Environment Variable helped me.

answered Aug 10, 2022 at 14:56

manoj reddy's user avatar

Using the task manager I noticed that I had another vscode-instance running that was not closed properly.
Shutting every vscode instance down using the Task manager, restarting it I got two vscode-windows, closed one, could install in the remaining one.

answered Dec 22, 2022 at 10:52

Brixomatic's user avatar

BrixomaticBrixomatic

3714 silver badges16 bronze badges

If you are using windows 11 with @binjie-liang answer, in your windows search for proxy settings and toggle off the Automatically Detect Settings. This will resolve the issue. Should be same with windows 10 also

answered Jan 16 at 3:14

jatharthan's user avatar

I had this problem in linux,

Manually downloading did not work with an error like: «Request was blocked due to exceeding usage of resource ‘Count’ in namespace AnnonymousID …» (I did not save the full message unfortunately). I think Network speed was not an issue because my collage who was connected to same network was able to download extensions.

closing all instances of vscode and re-opening solved it.

answered Jan 17 at 7:49

numan's user avatar

numannuman

711 silver badge4 bronze badges

I just restarted my entire computer and it worked.

I hate to have this dumb answer. But, I did look into most of the other answers. When something smells like a network issue and you «didn’t change anything», it can be many things.

answered Jan 25 at 9:30

SpiRail's user avatar

SpiRailSpiRail

1,37719 silver badges28 bronze badges

This is an issue with the proxy setting.

  • Press F1
  • Type User Settings
  • Search for «Proxy»
  • Http:Proxy will be empty
  • Add your proxy here with http://username:password@SERVER:PORT

And just restart visual studio code

answered Feb 16 at 6:04

Rahul Bhat's user avatar

Rahul BhatRahul Bhat

431 silver badge7 bronze badges

Same problem, easy solution: just login to Microsoft account and sync settings.

At least try this before all the other more complicated things?

answered Feb 23 at 2:31

david.pfx's user avatar

david.pfxdavid.pfx

10.4k3 gold badges30 silver badges63 bronze badges

1

You can also check if http_proxy is set as an environment variable and delete that line if set and no longer on a network that has proxy set-up.

enter image description here

answered May 22 at 10:02

talent makhanya's user avatar

I have had the same issue on Debian 10 and fixed it by downgrading VSCode to an older version 1.33.1.

answered Dec 15, 2021 at 12:41

Dhiaa Eddin Anabtawi's user avatar

1

I had same error: while fetching extensions xhr failed visual studio code on Mac and Windows.

VPN solved my problems.

answered Jan 25 at 9:27

Yerbol's user avatar

YerbolYerbol

4053 silver badges6 bronze badges

Same problem, updated VS Code on mac while connected to the VPN. After the update I got the XHR Error.

The solution was to stop the VPN, connect to the host and then reconnect the VPN and it seems to work normally. For now.

answered Mar 9 at 13:28

Alex Seceleanu's user avatar

By the way, I was using vscode on Ubuntu with GUI. At that time, I turned on both http and socks proxy in the settings application, but I forgot to set the socks port in Clash and then the same error occurred. Later, I set the socks port in the Clash configuration file, and then it was work. Similarly, I don’t fill in any settings for socks in the settings application, and only set the http proxy port, it will also work.

Do you want to fix XHR Failed error in VSCode?

At its heart, VSCode is based on the Electron framework. That means VSCode is basically a Chromium with code editing features developed on top of it. Whenever you get an error from VSCode, it’s most likely Chromium errors.

Users have reported that when they try to install an extension, especially behind a proxy network, they are presented with XHR Failed error. XHR Failed indicates that a few XHR requests may have been failed or interrupted while VSCode sends and receives extension information from the server.

In this article, we will discuss about possible fix for XHR Failed error in VSCode.

image-20210531161703991

Use a direct internet connection

If you’re behind a proxy network, try to disable it if you can.

Most of the time, the proxy network includes a firewall that may block VSCode requests to its servers.

In rare cases, the proxy network supports only HTTP or HTTPS protocol, leaving other communication through its network blocked, which can causes strange behavior in VSCode.

You can follow the instructions from Microsoft Forum to disable proxy on Windows 10. macOS users can consult this guide to do just that. Linux users should be able to disable proxy on their own, given that they are often more tech-savvy, but here’s a few tips on how to turn off proxy in Linux anyway.

Turn on automatic proxy detection

Chromium uses system proxy settings by default, so there’s a chance VSCode’s Chromium core does not recognize the proxy and cannot send/receive network data.

In order to turn on automatic proxy detection on Windows 10, follow HowToGeek guide.

automatic proxy detection Windows

Ignore certificate errors in VSCode

The actual implementation of the corporate proxy can vary from organization to organization, but there is one thing in common : they could all cause certificate errors.

Secure websites and applications use their own certificate to prevent themselves from online attacks. Internet traffic going through a corporate proxy can be modified by the proxy network in real time, causing certificate irregularities. Some other times, your organization offers their own CA certificate, which makes the situation even more complex.

You can try launching VSCode with --ignore-certificate-errors flag to disable strict certificate checking.

On Windows, the easiest way to do this is by running code.exe --ignore-certificate-errors from a Command Prompt window.

On Linux and macOS, you have to open Terminal app and run code --ignore-certificate-errors.

After that, try installing the extensions again to see whether the error message goes away.

Disable JS source maps

Source maps is basically a JavaScript engine feature that maps a combined/minified file back to an unbuilt state (think unminify). It was made for easier JavaScript debugging, but we don’t need to debug VSCode itself, so disabling it is safe. Plus, users have reported that disabling JavaScript source maps and CSS source maps solves XHR Failed error message .

In order to disable JavaScript source maps and CSS source maps in VSCode, fire up Command Palette and search for Developer: Toggle Shared Process.

image-20210531154850224

On Developer Tools that just pops up, click the Gear button (settings button) in the upper right corner.

image-20210531155130985

Uncheck Enable JavaScript source maps and Enable CSS source maps, then close the window.

image-20210531155245439

Change your DNS

If you live in a country where heavy internet censorship is implemented, such as China, Egypt or Turkey, maybe the firewall has blocked some Microsoft servers. You can try setting your DNS to Google DNS (8.8.8.8) or Cloudflare’s 1.1.1.1 servers to see if XHR Failed happens again or not. On Windows, you may have to run ipconfig /flushdns to flush the system’s DNS cache before changing the DNS.

Change-Windows-DNS-servers-to-Cloudflare-1.1.1.1

On Linux machines, you have to edit /etc/resolvconf/resolv.conf.d/base to make DNS changes persistent through restarts. Add these two lines to the file before rebooting so that the changes take effect.

nameserver 1.1.1.1
nameserver 1.0.0.1

Install the extension offline using VSIX file

All VSCode extensions is now available in the form of VSIX-packaged files. This allows for offline installation as well as extensions which are not originated from VSCode Marketplace.

You can download VSIX files directly from VSCode Marketplace or Open VSX Registry and install it offline, without the need for an internet connection. See our guide on How to install extensions in VSCode for detailed installation steps.

We hope that this article helps you solve the XHR Failed error in VSCode. VSCode is an awesome code editor, equipped with numerous features that supports developers. Here’s a few of them that we’ve covered, if you’re interested :

  • VSCode Format On Save – everything you need to know

  • Configure VSCode to work with Zsh

  • VSCode multiple cursors: advanced edition

  • Bind terminal commands to VSCode keyboard shortcuts

  • How to quickly create a comment block in VSCode

  • How to quickly duplicate a line in Visual Studio Code

  • How to comment out multiple lines in Visual Studio Code

  • How to automatically indent your code in Visual Studio Code

Эта проблема возникла несколько недель назад, когда я начал использовать NordVPN на своем ноутбуке. Когда я пытаюсь найти расширение и даже пытаюсь загрузить его через торговую площадку, я получаю такую ​​ошибку:

Единственное частичное решение, которое я нашел до сих пор, — это загрузка и установка расширений вручную.

Я проверял аналогичный вопрос здесь и в других местах в Интернете, но не нашел способа исправить это. Пока я пробовал:

  1. Очистка моего кеша DNS и установка его на DNS-сервер Google.
  2. Отключение VPN на моем ноутбуке и перезапуск VS Code.
  3. Очистка результатов поиска расширений.
  4. Отключение всех запущенных расширений.

Я использую ноутбук под управлением Windows 10. Есть ли другие возможные решения, которые я не пробовал?

2021-12-01 02:08

25
ответов

У меня была такая же проблема, и, наконец, сегодня я просто решил эту проблему.

Все, что вам нужно сделать, это войти в файл настроек json из VSC.

      1. Press F1
2. Type User Settings
3. Search for Proxy
4. In proxy section, look for the title `Http: Proxy Autorization`
5. Click on 'Edit in settings.json'
6. Delete all brackets containing proxy data
7. Save json file

После этого просто перезапустите VSC. Вы также можете найти json find на
%appdata%/Code/User/settings.json

2022-02-02 05:53

так что я нахожу это

  1. нажмите f1
  2. настройка пользователя поиска
  3. нажмите Enter
  4. поиск по настройке пользователя «прокси»
  5. нажмите Enter
  6. ищите «использовать поддержку прокси для расширений».
  7. изменить overide на on

может быть, это может помочь вам.

2022-03-13 12:38

Для меня ошибка «Ошибка XHR» появляется, когда настройки прокси между вашей системой ПК и vs-кодом конфликтуют.

1.Проверьте системные настройки прокси ПК.

2. Откройте cmd или терминал, введите

echo %http_proxy%, если есть какие-либо выходные данные, убедитесь, что они соответствуют настройкам прокси-сервера вашего ПК. Потому что, если прокси на коде vs не установлен, он будет унаследован от
http_proxyа также
https_proxyпеременные окружения.

3. Если нет, откройте vs code settings.json, добавьте
"http.proxy":"http://proxyname:port"который соответствует настройке прокси-сервера вашего ПК, без косой черты в конце.

Попробуйте загрузить расширения еще раз. Надеюсь, это поможет. ^^

2022-02-07 08:08

Просто выполните следующие шаги:

  1. Нажмите F1
  2. Введите пользовательские настройки
  3. Найдите «Авторизация прокси»
  4. Нажмите «Изменить в settings.json».
  5. Добавить новую пару «ключ-значение» — «http.proxySupport»: «on»
  6. Сохранить JSON-файл

В моем конце файл settings.json

      {
    "http.proxyAuthorization": null,
    "http.proxySupport": "on"
}

2022-12-06 05:28

Я не использую прокси и использую NextDNS, поэтому не хочу менять настройки DNS.

В качестве обходного пути вы можете открыть код с помощью--ignore-certificate-errorsфлаг, установите любые расширения, затем перезапустите без флага.

На окнах:

      code --ignore-certificate-errors

2022-08-15 05:29

В моем случае решение состояло в том, чтобы удалить
HTTPS_PROXY(Может быть
HTTP_PROXY) переменная среды, установленная при инициализации терминала. Я удалил строку, которая устанавливает переменную среды для прокси, перезапустил ОС, и ошибка исчезла.

За исключением bash или любой другой оболочки, совместимой с sh, переменная окружения может находиться в

  • /etc/environment: специально предназначен для переменных окружения
  • /etc/env.d/*: переменные среды, разделенные на несколько файлов
  • /etc/profile: все типы сценариев инициализации
  • /etc/profile.d/*: скрипты инициализации
  • /etc/bashrc,
    /etc/bash.bashrc: предназначен для функций и псевдонимов
  • ~/.bash_profile: инициализация для логина (bash-)shells
  • ~/.bashrc: инициализация для всех интерактивных (bash-)шеллов
  • ~/.profile: используется для всех оболочек
  • ~/.cshrc,
    ~/.zshrc,
    ~/.tcshrc: аналогично для не-bash оболочек

Кредит на этот пост. /questions/13135984/eksklyuzivnyij-dostup-k-fajlam-v-log-fajl-s-vbscript-i-filesystemobject/13135990#13135990

2022-02-07 11:51

10 декабря 2021 г.
Я использую vscode с Ubuntu 20.04.
Вчера я столкнулся с ошибками XHR и не смог установить никаких расширений.
Много гуглил, но ничего не работает.
В конце концов я загрузил и установил новейшую версию VSCode(версия deb), и теперь все в порядке. (Я не знаю почему, но, возможно, вы можете попробовать! Удачи!)

2021-12-09 17:48

Я получил ту же ошибку с версией .deb со страницы visualstudio.com.

Вы пытались открыть Инструменты разработчика (F1, Инструменты разработчика). Какая ошибка возвращается? У меня был ERR_CERT_AUTHORITY_INVALID. Флаг командной строки —ignore-certificate-errors является для меня обходным путем (как указано здесь https://code.visualstudio.com/docs/setup/network).

2021-12-14 11:48

В моем случаеhttp_proxy system environmentпеременная была установлена ​​​​в Windows 10. После удаления этого кода VS началась загрузка расширений.

2022-09-03 09:10

Я использую Windows 11, и у меня была такая же проблема. На моем ноутбуке установлена ​​Wi-Fi-плата Killer, и в ней есть возможность «включить быструю игру». Было проверено, чтобы запускаться автоматически с игрой. Я просто снял его, и эта ошибка перестала появляться.

Я надеюсь, что ваша проблема будет так же легко решить, как и моя. Попробуйте, может быть, ваш брандмауэр.

2022-01-24 22:06

Насколько я знаю, ошибка XHR имеет несколько возможных причин. Самое простое исправление, которое следует предпринять перед более сложными методами, — перезапустить VS Code.

Я видел эту ошибку пару раз и смог решить ее таким образом, для меня это не было связано с настройками прокси, тогда как для других пользователей это может быть. Возможный подходящий сценарий — запуск экземпляра VS Code без перезапуска или обновления в течение длительных периодов времени, например дней или даже недель.

2022-05-05 10:06

Для меня мне пришлось отключить эту опцию в коде Visual Studio.

2022-08-28 04:18

Вы можете загрузить все расширения vscode отсюда или выполнить поиск расширения в Google и перейти на официальный сайт vscode. Найдите свое расширение и скопируйте команду установки. Перейдите в VS Code и нажмите Ctrl + p, затем вставьте команду установки и нажмите Enter. Установка начнется. Для получения дополнительной информации вы можете прочитать эту статью: Код Visual Studio «Ошибка при получении расширений. XHR не удалось — V »

2022-02-24 15:15

Используя диспетчер задач, я заметил, что у меня запущен еще один экземпляр vscode, который не был закрыт должным образом. Выключив каждый экземпляр vscode с помощью диспетчера задач, перезапустив его, я получил два vscode-окна, закрыл одно, смог установить в оставшееся.

2022-12-22 10:52

Та же проблема, простое решение: просто войдите в учетную запись Microsoft и синхронизируйте настройки.

По крайней мере, попробуйте это перед всеми другими более сложными вещами?

2023-02-23 02:31

Я столкнулся с той же проблемой. И я удаляю каталог .vscode-server на сервере. Переподключите мой сервер успешно.

2022-09-16 02:23

Это проблема с настройкой прокси.

  • Нажмите F1
  • Введите пользовательские настройки
  • Найдите «Прокси»
  • Http: прокси будет пустым
  • Добавьте сюда свой прокси с http://username: [email protected] :PORT

И просто перезапустите код Visual Studio

2023-02-16 06:04

Я просто перезагрузил весь свой компьютер, и это сработало.

Я ненавижу этот глупый ответ. Но я просмотрел большинство других ответов. Когда что-то пахнет проблемой сети, а вы «ничего не меняли», это может быть много вещей.

2023-01-25 09:30

У меня была такая же проблема… это очень специфическое решение, которое сработало для меня, но я надеюсь, что оно поможет кому-то, кто пройдет здесь в будущем:

Очевидно.. Я по ошибке отключил Cloudflare Zero Trust «Warp 1.1.1.1» в CLI, и некоторые приложения (vscode,firefox,skype..) использовали его.. так что все, что мне нужно было сделать, это переподключиться.. если ваш варп-лоток значок не работает, как у меня, тогда все, что вам нужно сделать, это ввести команду:

      warp-cli connect

И все снова заработало.

2022-12-11 11:41

Если вы используете Windows 11 с ответом @binjie-liang, в ваших окнах найдите настройки прокси и отключите автоматическое определение настроек. Это решит проблему. Должно быть так же и с windows 10

2023-01-16 03:14

Запуск Windows 11, это брандмауэр Windows предотвращает это.

  1. Откройте Безопасность Windows
  2. Нажмите Брандмауэр и сетевая безопасность.
  3. Нажмите «Разрешить приложение через брандмауэр».
  4. Нажмите «Изменить настройки».
  5. Нажмите «Разрешить другое приложение».
  6. Перейдите туда, где установлен VS Code, и нажмите Code.exe.
  7. Убедитесь, что код отображается в списке разрешенных приложений.

И это все

Надеюсь, это сработает и с вами.

С.

2022-11-02 13:53

Я столкнулся с этой проблемой в 7-2022, и она ушла даже без перезапуска vscode. Причина была в плохом интернет-соединении. Если это ваша ситуация, проверьте качество вашего интернет-соединения и просто нажмите кнопку «Обновить», через мгновение появятся расширения!

2022-07-07 07:55

У меня была такая же ошибка: при извлечении расширений xhr не удалось выполнить код Visual Studio на Mac и Windows.

VPN решил мои проблемы.

2023-01-25 09:27

У меня была такая же проблема в Debian 10, и я исправил ее, понизив VSCode до более старой версии 1.33.1.

2021-12-15 12:41

Visual Studio Code Error while fetching extensions. XHR failed

Questions : Visual Studio Code Error while fetching extensions. XHR failed

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00

808

This problem started a few weeks ago, when I query uvdos visual-studio-code started using NordVPN on my laptop.
When I query uvdos visual-studio-code try to search for an extension and even when query uvdos visual-studio-code trying to download through the marketplace I query uvdos visual-studio-code get this error:

EDIT: Just noticed another thing that might query uvdos visual-studio-code indicate to what’s causing the issue. When I query uvdos visual-studio-code open VSCode and go to developer tools I get query uvdos visual-studio-code this error messege (before even doing query uvdos visual-studio-code anything):

«(node:19368) [DEP0005] DeprecationWarning: query uvdos visual-studio-code Buffer() is deprecated due to security and query uvdos visual-studio-code usability issues. Please use the query uvdos visual-studio-code Buffer.alloc(), Buffer.allocUnsafe(), or query uvdos visual-studio-code Buffer.from() methods instead.(Use Code query uvdos visual-studio-code —trace-deprecation … to show where the query uvdos visual-studio-code warning was created)»

The only partial solution I found so far was query uvdos visual-studio-code to manually download and install extensions.

I’ve checked similar question here and in query uvdos visual-studio-code other places online, but I didn’t find a way query uvdos visual-studio-code to fix this. So far I’ve tried:

  1. Flushing my DNS cache and setting it to google’s DNS server.
  2. Disabling the VPN on my laptop and restarting VS Code.
  3. Clearing the Extension search results.
  4. Disabling all the extensions currently running.

I’m using a laptop running Windows 10. Any query uvdos visual-studio-code other possible solutions I haven’t tried?

Total Answers 9

26

Answers 1 : of Visual Studio Code Error while fetching extensions. XHR failed

For me , ‘XHR failed’ error appears when query uvdos marketplace the proxy settings between your PC query uvdos marketplace system and vs code are conflict.

1.Check PC system proxy settings.

2.Open cmd or terminal, type

echo %http_proxy%, if any output, make query uvdos marketplace sure it fits your pc proxy setting. query uvdos marketplace Because if the proxy on vs code not query uvdos marketplace being set, will be inherited from the query uvdos marketplace http_proxy and https_proxy environment query uvdos marketplace variables.

3.If none, open vs code settings.json , query uvdos marketplace add
«http.proxy»:»http://proxyname:port» query uvdos marketplace that fits your pc proxy setting ,without query uvdos marketplace a trailing slash.

Try download extensions again.Hope this query uvdos marketplace helps. ^^

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

mRahman

2

Answers 2 : of Visual Studio Code Error while fetching extensions. XHR failed

I had the same problem, and finally, query uvdos marketplace today, I just resolved it.

All you need to do is enter to the json query uvdos marketplace settings file from VSC

1. Press F1
2. Type User Settings
3. Search for Proxy
4. In proxy section, look for the title `Http: Proxy Autorization`
5. Click on 'Edit in settings.json'
6. Delete all brackets containing proxy data
7. Save json file

After that, just restart VSC
You can query uvdos marketplace also find the json find on query uvdos marketplace %appdata%/Code/User/settings.json

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

karim

3

Answers 3 : of Visual Studio Code Error while fetching extensions. XHR failed

so i find this

  1. press f1
  2. search user setting
  3. click enter
  4. search on user setting » proxy «
  5. click enter
  6. look for «use the proxy support for extensions.»
  7. change overide to on

maybe this can help you.

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

yousuf

2

Answers 4 : of Visual Studio Code Error while fetching extensions. XHR failed

In my case, the solution was to remove query uvdos marketplace HTTPS_PROXY (Could be HTTP_PROXY) query uvdos marketplace environment variable set at terminal query uvdos marketplace initialization.
I removed the line which query uvdos marketplace sets the environment variable for proxy, query uvdos marketplace restarted the OS and the error query uvdos marketplace disappeared.

Apart from ~/.bashrc for bash or any query uvdos marketplace other sh-compatible shell, environment query uvdos marketplace variable could be in

  • /etc/environment: specifically meant for environment variables
  • /etc/env.d/*: environment variables, split in multiple files
  • /etc/profile: all types of initialization scripts
  • /etc/profile.d/*: initialization scripts
  • /etc/bashrc, /etc/bash.bashrc: meant for functions and aliases
  • ~/.bash_profile: initialization for login (bash-)shells
  • ~/.bashrc: initialization for all interactive (bash-)shells
  • ~/.profile: used for all shells
  • ~/.cshrc, ~/.zshrc, ~/.tcshrc: similar for non-bash shells

Credit to this query uvdos marketplace post.
https://unix.stackexchange.com/a/249922

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

joya

5

Answers 5 : of Visual Studio Code Error while fetching extensions. XHR failed

December 10,2021.
I’m using vscode with query uvdos marketplace ubuntu 20.04.
I came across the XHR query uvdos marketplace errors from yesterday and could not query uvdos marketplace install any extensions.
Googled a lot query uvdos marketplace but nothing works.
Eventually I query uvdos marketplace downloaded and installed the newest query uvdos marketplace version of VSCode(deb version) and query uvdos marketplace everything is fine now.
(I don’t know query uvdos marketplace why but maybe you can give it a try! query uvdos marketplace Good Luck!)

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

yousuf

4

Answers 6 : of Visual Studio Code Error while fetching extensions. XHR failed

I got the same error with the .deb query uvdos marketplace version from the visualstudio.com page.

Have you tried opening the Developer query uvdos marketplace Tools (F1, Developer Tools). Which error query uvdos marketplace is returned?
I had query uvdos marketplace ERR_CERT_AUTHORITY_INVALID. The query uvdos marketplace —ignore-certificate-errors command-line query uvdos marketplace flag is a workaround for me (as query uvdos marketplace indicated here query uvdos marketplace https://code.visualstudio.com/docs/setup/network).

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

joya

5

Answers 7 : of Visual Studio Code Error while fetching extensions. XHR failed

I have had the same issue on Debian 10 query uvdos marketplace and fixed it by downgrading VSCode to an query uvdos marketplace older version 1.33.1.

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

yousuf

1

Answers 8 : of Visual Studio Code Error while fetching extensions. XHR failed

I’m using windows 11 and I was having query uvdos marketplace the same issue.
My laptop has a Killer query uvdos marketplace wifi board and it comes with a option to query uvdos marketplace «enable game fast». It was checked to query uvdos marketplace start automatically with a game. I just query uvdos marketplace unchecked it and this error stopped to query uvdos marketplace show up.

I hope your problem will be easy as mine query uvdos marketplace to solve. Try maybe your firewall.

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

yousuf

3

Answers 9 : of Visual Studio Code Error while fetching extensions. XHR failed

As far as I am aware the XHR error has query uvdos marketplace several possible causes. The easiest fix query uvdos marketplace which should be attempted prior to more query uvdos marketplace complicated methods is restarting VS query uvdos marketplace Code.

I have seen this error a couple of times query uvdos marketplace and have been able to resolve it this query uvdos marketplace way, for me it was not related to proxy query uvdos marketplace settings, whereas for other users it query uvdos marketplace might be. A possible relevant scenario query uvdos marketplace is running a VS Code instance without query uvdos marketplace restart or update over prolongued query uvdos marketplace periods of time, such as days or even query uvdos marketplace weeks.

0

2023-06-01T01:21:42+00:00 2023-06-01T01:21:42+00:00Answer Link

joya

Понравилась статья? Поделить с друзьями:
  • Error while executing the query ошибка
  • Error verifying digital signature faceit как исправить ошибку
  • Error undefined offending command ошибка печати
  • Error ts 02 brother ошибка как исправить
  • Error status ext ram exception 0xc0050005 ошибка flashtool