Blog Layout

Visual Studio Code error while fetching extensions. XHR Failed.

Mike Arthur • Oct 16, 2021

"XHR Failed" error when attempting to install VS Code Extension

Brand new Windows 10 Dell out of the box.
Installed VS Code then tried to install extension, specifically the 'Salesforce Extension Pack', but I see reports of this error for other extensions too.
It failed to install with 'XHR Failed'.
Just on home wifi here, no corporate firewall, proxy, VPN or anything.

Got it working with the help of this post
  • Press Windows key and type 'Network Connections'
  • Select 'View Network Connections'
  • Right click the network that you are connected to and select 'Properties'
  • Click 'Internet Protocol Version 4 (TCP/IPv4) and 'Properties'
  • Click 'Use the following DNS server addresses' and enter
    • Preferred DNS Server: 8.8.8.8
    • Alternate DNS Server: 8.8.4.4
      (These are Google's DNS servers)
  • Click 'OK', 'Close'
  • Press Windows key and enter 'cmd'
  • Click on 'Command Prompt'
  • Type
    ipconfig /flushdns
    enter
  • Restart VS Code and try again to install extension

My Blog of Salesforce Stuff

by Mike Arthur 09 Jun, 2020
What is $A (dollar A) in Lightning Aura component framework? Is it a global variable? Where are the docs for $A?
by Mike Arthur 08 May, 2020
Authorise a Salesforce Connected App using OAuth 2.0 JWT Bearer Flow
by Mike Arthur 26 Apr, 2020
REST API Connection to Salesforce Connected App Using OAuth 2.0 Authentication from Postman
by Mike Arthur 23 Mar, 2020
How to create a Lightning tab menu with dropdown sub-menu
by Mike Arthur 27 Nov, 2018
How to show a month by month trend chart with multiple years on same chart
by Mike Arthur 06 Nov, 2018
What to do if you receive emails about expiring certificates
22 Aug, 2018
Process json strings when working with integrations
by Mike Arthur 22 Aug, 2018
If you're switching email accounts you can copy appointments from one calendar to the other
by Mike Arthur 22 Aug, 2018
When you search in Outlook 2016, how do you see in which folder you filed an email in the results?
by Mike Arthur 10 May, 2018
A change set or ant deployment will fail if a field that is required in the field definition is included in a profile or permission set that is being deployed
More posts
Share by: