Immediate Fix
The most common cause for the “Error while fetching extensions” in VS Code is a conflict in your network proxy or SSL settings. To resolve this immediately, you should disable strict SSL checking which often interferes with the Marketplace handshake.
Navigate to File > Preferences > Settings. Search for “Proxy” and uncheck the Http: Proxy Strict SSL box. Restart VS Code and try fetching the extensions again.
# Use this command to verify if your machine can reach the Marketplace
curl -I https://marketplace.visualstudio.com/
If the curl command returns a 200 OK status but VS Code still fails, the issue is localized to the application’s internal network layer rather than your internet service provider.
Technical Explanation
Technically, this error is categorized as an XHR (XMLHttpRequest) failure. It happens when the renderer process in VS Code fails to receive a valid response from the Microsoft Extension Gallery API.
The table below breaks down the common technical triggers for this connection failure:
| Trigger | Technical Detail |
|---|---|
| Certificate Mismatch | The local environment does not trust the SSL certificate provided by the Marketplace. |
| Environment Variables | System-wide variables like HTTP_PROXY are misconfigured and overriding VS Code settings. |
| Cache Corruption | The local extension metadata cache has become malformed, preventing new data writes. |
Most of these issues stem from corporate firewalls or VPNs that perform “Man-in-the-Middle” (MITM) inspection on HTTPS traffic, which breaks the secure chain VS Code expects.

Alternative Methods
1. Purge the Extension Cache
If settings changes don’t work, you may need to delete the cached extension data. This forces VS Code to rebuild the index from scratch.
# For Windows users
del %USERPROFILE%\.vscode\extensions\.cache
# For macOS and Linux users
rm -rf ~/.vscode/extensions/.cache
2. Configure DNS Settings
Sometimes local DNS servers fail to resolve the Marketplace subdomains. Switching to a public DNS like Google (8.8.8.8) or Cloudflare (1.1.1.1) in your OS network settings can bypass these routing dead-ends.
3. Manual VSIX Installation
As a last resort, if your network environment is too restrictive for the built-in gallery, you can download extensions manually. Visit the VS Code Marketplace website, download the .vsix file for your extension, and install it via the “Install from VSIX…” option in the extensions sidebar menu.