I am unable to install any extensions or code spaces on visual studio

Md Tauseef Zubayer Bin Amin 0 Reputation points
2023-12-25T22:49:21.2766667+00:00


When I first open visual studio code, the output says this:

2023-12-25 18:24:28.042 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'registerIssueDataProvider' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.

2023-12-25 18:24:28.642 [info] Started local extension host with pid 12688.

2023-12-25 18:24:31.323 [info] [perf] Render performance baseline is 82ms





When I go to extensions, and try to install python, an error message pops up: Error while installing 'Python' extension. Please check the [log](command:workbench.action.showWindowLog) for more details.

The log shows: 

2023-12-25 18:26:50.925 [error] Error: XHR failed

    at k.onerror (vscode-file://vscode-app/c:/Users/mtzbi/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)

2023-12-25 18:26:50.977 [error] Error: XHR failed

    at k.onerror (vscode-file://vscode-app/c:/Users/mtzbi/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)

2023-12-25 18:26:50.984 [error] XHR failed: Error: XHR failed

    at k.onerror (vscode-file://vscode-app/c:/Users/mtzbi/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)





Also when I try to open Edx Harvard CS50 code space on VS code desktop, it says: "installing extension github code spaces", followed by XHR error. The log shows: 

2023-12-25 18:28:51.685 [error] XHR failed: Error: XHR failed

    at k.onerror (vscode-file://vscode-app/c:/Users/mtzbi/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)




I have re-installed VS code multiple times, let it through my firewall, used "code --ignore-certificate-errors", made sure 'http proxy' is set up correctly, and tried all 4 options in proxy support. But noting is working. 


Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,205 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
228 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Vahid Ghafarpour 21,800 Reputation points
    2023-12-26T01:35:28.3933333+00:00

    Thanks for posting your question in the Microsoft Q&A forum.
    If the VS Code network connection wasn't blocked by a firewall/anti-virus, please check the install extension using the command line to bypass any UI-related issues during installation.

    code --install-extension ms-python.python
    

    Last but not least, Sometimes, issues can be related to corrupted user data. Try opening VS Code with a clean user data folder (delete or rename the old version).

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **


  2. Paul 0 Reputation points
    2023-12-27T02:48:21.54+00:00

    I get the exact same error message.
    When I disable the Windows Defender Firewall everything is OK, so it's got to be a rule in the Firewall.

    I created a new firewall rule explicitly allowing all traffic for "vscode.exe" but the problem persists...

    Error: XHR failed
    
        at k.onerror (vscode-file://vscode-app/c:/Users/mtzbi/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)
    
    0 comments No comments

  3. Pamesh 0 Reputation points
    2024-09-02T11:01:08.47+00:00

    Performing all these steps, but nothing is working.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.