vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Error in all extensions (Unable to resolve nonexistent file)

Open okineadev opened this issue 11 months ago • 8 comments

Type: Bug

  1. Updated VS Code
  2. I see the "⚠️" icon in the extension bar
  3. All extensions have the following error:
Unable to read file 'c:\Users\yrabo.vscode-insiders\extensions\1natsu.insert-br-tag-1.0.0\package.json' (Error: Unable to resolve nonexistent file 'c:\Users\yrabo.vscode-insiders\extensions\1natsu.insert-br-tag-1.0.0\package.json')

I suspect that your engineers forgot to put a backslash before .vscode-insiders - c:\Users\yrabo.vscode-insiders ...

VS Code version: Code - Insiders 1.97.0-insider (2569d71b0491afddb23e173ee6cc2eb284f1b0b9, 2025-01-08T13:30:54.238Z) OS version: Windows_NT x64 10.0.26100 Modes: Remote OS version: Linux x64 5.15.167.4-microsoft-standard-WSL2

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz (16 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.70GB (5.58GB free)
Process Argv --crash-reporter-id be554c07-aa1b-477b-a3ce-992f4e6ed782
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-24.04
OS Linux x64 5.15.167.4-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz (16 x 0)
Memory (System) 7.61GB (5.79GB free)
VM 0%
Extensions (21)
Extension Author (truncated) Version
feather-vscode mel 1.0.1
remote-containers ms- 0.394.0
remote-wsl ms- 0.88.5
material-icon-theme PKi 5.17.0
biome bio 2024.12.22126
gitignore cod 0.9.0
vscode-markdownlint Dav 0.58.0
EditorConfig Edi 0.16.4
prettier-vscode esb 11.0.0
copilot Git 1.256.1304
copilot-chat Git 0.24.2025010901
vscode-github-actions git 0.27.0
todo-tree Gru 0.0.226
auto-markdown-toc hun 3.0.13
svg joc 1.5.4
vscode-publint kra 0.1.0
vscode-copilot-vision ms- 0.2.2024111316
bun-vscode ove 0.0.26
trailing-spaces sha 0.4.1
even-better-toml tam 0.21.2
volar Vue 2.2.0

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
vsaa593cf:30376535
py29gd2263:31024238
c4g48928:30535728
a9j8j154:30646983
962ge761:30841072
pythonnoceb:30776497
dsvsc014:30777825
dsvsc015:30821418
pythonmypyd1:30859725
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
pythonait:30973460
dvdeprecation:31040973
dwnewjupyter:31046869
newcmakeconfigv2:31071590
nativerepl1:31134653
pythonrstrctxt:31093868
nativeloc1:31118317
cf971741:31144450
e80f6927:31120813
iacca1:31150324
notype1:31143044
dwcopilot:31158714
h409b430:31177054
2j25a237:31183119
c3hdf307:31184662
6074i472:31201624

okineadev avatar Jan 09 '25 07:01 okineadev

UPD: missing backslash before dots in paths

Image

okineadev avatar Jan 09 '25 07:01 okineadev

Looks like there are some invalid entries in your extensions.json file which is now being surfaced in the UI. We are planning to clean up such invalid entries automatically.

sandy081 avatar Jan 09 '25 09:01 sandy081

For me, I fixed it by removing all extensions

okineadev avatar Jan 28 '25 07:01 okineadev

I shouldn't have to remove all my extensions, including the microsoft ones.

cyraid avatar Feb 09 '25 22:02 cyraid

I'm getting the same problem. These are not invalid extensions that require cleaning up. There's a slash missing between my windows user name and .vscode in the path. I'm on 1.97.0.

Deleting extensions.json and restarting 'fixed' my extensions, in that the file was created again with my extensions in (settings sync...?) although all the 'installed in wsl' information had gone.

paulfelton avatar Feb 10 '25 14:02 paulfelton

Hmm, here all entries in my %USERPROFILE%\.vscode\extensions\extensions.json have proper (looking?) absolute paths, also for the extensions that show this error, for example:

,
    {
        "identifier": {
            "id": "cschlosser.doxdocgen",
            "uuid": "da7e26d5-d57c-4742-ab47-d77fb189e195"
        },
        "version": "1.4.0",
        "location": {
            "$mid": 1,
            "path": "/c:/Users/XXX/.vscode/extensions/cschlosser.doxdocgen-1.4.0",
            "scheme": "file"
        },
        "relativeLocation": "cschlosser.doxdocgen-1.4.0",
        "metadata": {
            "id": "da7e26d5-d57c-4742-ab47-d77fb189e195",
            "publisherId": "45f11b45-124a-44bb-be40-51cea102eb70",
            "publisherDisplayName": "Christoph Schlosser",
            "isPreReleaseVersion": false,
            "installedTimestamp": 1645798998096
        }
    },

MartinEmrich avatar Feb 14 '25 06:02 MartinEmrich

Each case of this for me includes a message that the extension introduces executable code, which is not present in the currently installed version. Upgrade manually. One example of this is for https://marketplace.visualstudio.com/items?itemName=Appurist.json-flattener

bolyardwork avatar Mar 04 '25 17:03 bolyardwork

This is happening to me and I'd hope there's a way to resolve it without removing all my extensions

sadan4 avatar Mar 07 '25 14:03 sadan4

I had this same problem (with the .NET Tools C# extension) and was able to resolve it without uninstalling or reinstalling any of my extensions. I can't tell you how this solution actually works, cause I have no idea, or why the extension entry was messed up in the first place.


I was looking at my extensions.json file when I noticed that the entry for the extension, the one that was broken (ms-dotnettools.csharp), was differently formatted than all the rest.

The typical format for an extension entry is this:

Typical entry (leonardssh.vscord)
{
    "identifier": {
        "id": "leonardssh.vscord",
        "uuid": "20675c06-f272-4cc8-8611-83ebb5583c5a"
    },
    "version": "5.2.13",
    "location": {
        "$mid": 1,
        "path": "/c:/Users/---/.vscode/extensions/leonardssh.vscord-5.2.13",
        "scheme": "file"
    },
    "relativeLocation": "leonardssh.vscord-5.2.13",
    "metadata": {
        "installedTimestamp": 1745959402968,
        "pinned": false,
        "source": "gallery",
        "id": "20675c06-f272-4cc8-8611-83ebb5583c5a",
        "publisherId": "2c34273e-24b8-499a-b859-8e27e48decc5",
        "publisherDisplayName": "leonardssh",
        "targetPlatform": "undefined",
        "updated": false,
        "private": false,
        "isPreReleaseVersion": false,
        "hasPreReleaseVersion": false
    }
}

The entry for C# was this:

C# entry (ms-dotnettools.csharp)
{
    "identifier": { "id": "ms-dotnettools.csharp" },
    "version": "2.72.34",
    "location": {
        "$mid": 1,
        "fsPath": "c:\\Users\\---\\.vscode\\extensions\\ms-dotnettools.csharp-2.72.34-win32-x64",
        "_sep": 1,
        "external": "file:///c%3A/Users/---/.vscode/extensions/ms-dotnettools.csharp-2.72.34-win32-x64",
        "path": "/c:/Users/---/.vscode/extensions/ms-dotnettools.csharp-2.72.34-win32-x64",
        "scheme": "file"
    },
    "relativeLocation": "ms-dotnettools.csharp-2.72.34-win32-x64",
    "metadata": {
        "installedTimestamp": 1745966513193,
        "pinned": false,
        "source": "gallery",
        "id": "d0bfc4ab-1d3a-4487-8782-7cf6027b4fff",
        "publisherId": "d05e23de-3974-4ff0-8d47-23ee77830092",
        "publisherDisplayName": "Microsoft",
        "targetPlatform": "win32-x64",
        "updated": false,
        "private": false,
        "isPreReleaseVersion": false,
        "hasPreReleaseVersion": false
    }
}

The differences between them are:

  • C# added location -> fsPath
  • C# added location -> _sep
  • C# added location -> external
  • C# removed identifier -> uuid

To fix the issue, I just formatted the extension entry like everything else. I removed the entries that were added, and re-added the UUID entry (which you can just copy from the metadata -> id entry).

Fixed C# extension entry
{
    "identifier": {
        "id": "ms-dotnettools.csharp",
        "uuid": "d0bfc4ab-1d3a-4487-8782-7cf6027b4fff"
    },
    "version": "2.72.34",
    "location": {
        "$mid": 1,
        "path": "/c:/Users/---/.vscode/extensions/ms-dotnettools.csharp-2.72.34-win32-x64",
        "scheme": "file"
    },
    "relativeLocation": "ms-dotnettools.csharp-2.72.34-win32-x64",
    "metadata": {
        "installedTimestamp": 1745966513193,
        "pinned": false,
        "source": "gallery",
        "id": "d0bfc4ab-1d3a-4487-8782-7cf6027b4fff",
        "publisherId": "d05e23de-3974-4ff0-8d47-23ee77830092",
        "publisherDisplayName": "Microsoft",
        "targetPlatform": "win32-x64",
        "updated": false,
        "private": false,
        "isPreReleaseVersion": false,
        "hasPreReleaseVersion": false
    }
}

PitchBlackNights avatar Apr 29 '25 23:04 PitchBlackNights

Same issue occurring recurrently.

Message on a problematic extension

Unable to read file 'c:\Users\MyUsername.vscode\extensions\ginfuru.ginfuru-better-solarized-dark-theme-0.10.9\package.json' (Error: Unable to resolve nonexistent file 'c:\Users\MyUsername.vscode\extensions\ginfuru.ginfuru-better-solarized-dark-theme-0.10.9\package.json')

Version Version: 1.103.1 (user setup) Commit: 360a4e4fd251bfce169a4ddf857c7d25d1ad40da Date: 2025-08-12T16:25:40.542Z Electron: 37.2.3 ElectronBuildId: 12035395 Chromium: 138.0.7204.100 Node.js: 22.17.0 V8: 13.8.500258-electron.0 OS: Windows_NT x64 10.0.26100

Workaround

Remove any problematic extensions, then reinstall them. Restart VS Code afterward.

cgasp avatar Aug 15 '25 08:08 cgasp