microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.2k stars 29.29k forks source link

Old extensions never removed from disk after update #228417

Closed alan-null closed 1 month ago

alan-null commented 1 month ago

Related to: #78107

Does this issue occur when all extensions are disabled?: Yes

OsName : Microsoft Windows 10 Pro OsType : WINNT OsOperatingSystemSKU : 48 OsVersion : 10.0.19045 OsCSDVersion : OsBuildNumber : 19045



**Steps to Reproduce:**

1. install vscode
2. install extensions, i.e `ms-dotnettools.csharp`
3. wait for extension to update
4. check local directory (in my case `C:\Users\Alan\.vscode\extensions`)

**Actual Result:**
Notice extensions groups
![image](https://github.com/user-attachments/assets/c7b9c683-7e8f-4359-8d68-5a13a9b917e1)

**Expected Result:**
Obsolete extensions should be removed once the update was installed
RedCMD commented 1 month ago

I think they get removed after a time delay? or after so many restarts means you can revert back to the previous update without needing to download again

sandy081 commented 1 month ago

Obsolete extensions should be removed once the update was installed

There are removed on max 2 restarts of VS Code. Please try restarting the VS Code and check.

alan-null commented 1 month ago

@sandy081 some of them are but not all.

left - before restart right - after multiple restarts

diff contains names of all the items in extensions folder image [...] image

number on the last line represents count of all the items within C:\Users\Alan\.vscode\extensions\

sandy081 commented 1 month ago
alan-null commented 1 month ago

@sandy081

  • Can you please share extensions.json file in that folder?

extensions.json

  • Are you using profiles? If so, please share the extensions.json files of all profiles in F1 > Open User Data Folder > User > Profiles folder?

Yes. profiles.zip

  • Quit VS Code and start VS Code from command line with trace flag code --trace. After VS Code opens, share following log: F1 > Open View... > Shared
2024-09-25 19:26:59.578 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:26:59.607 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:00.361 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:00.370 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:01.586 [info] Getting Manifest... gitpod.gitpod-desktop
2024-09-25 19:27:01.589 [info] Getting Manifest... ms-azuretools.vscode-docker
2024-09-25 19:27:01.738 [info] Installing extension: ms-azuretools.vscode-docker {"productVersion":{"version":"1.93.1","date":"2024-09-11T17:20:05.685Z"},"pinned":false,"isApplicationScoped":false,"profileLocation":{"$mid":1,"external":"vscode-userdata:/c%3A/Users/Alan/.vscode/extensions/extensions.json","path":"/c:/Users/Alan/.vscode/extensions/extensions.json","scheme":"vscode-userdata"},"installOnlyNewlyAddedFromExtensionPack":true}
2024-09-25 19:27:01.743 [info] Installing extension: gitpod.gitpod-desktop {"productVersion":{"version":"1.93.1","date":"2024-09-11T17:20:05.685Z"},"pinned":false,"isApplicationScoped":false,"profileLocation":{"$mid":1,"external":"vscode-userdata:/c%3A/Users/Alan/.vscode/extensions/extensions.json","path":"/c:/Users/Alan/.vscode/extensions/extensions.json","scheme":"vscode-userdata"},"installOnlyNewlyAddedFromExtensionPack":true}
2024-09-25 19:27:01.859 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:01.863 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:02.109 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:02.112 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:02.377 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:02.383 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:02.409 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:02.412 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:02.567 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:02.623 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:03.890 [info] Extension signature verification result for gitpod.gitpod-desktop: Success. Executed: true. Duration: 661ms.
2024-09-25 19:27:04.812 [info] Extension signature verification result for ms-azuretools.vscode-docker: Success. Executed: true. Duration: 1499ms.
2024-09-25 19:27:06.198 [info] Extracted extension to file:///c%3A/Users/Alan/.vscode/extensions/ms-azuretools.vscode-docker-1.29.3: ms-azuretools.vscode-docker
2024-09-25 19:27:06.212 [info] Renamed to c:\Users\Alan\.vscode\extensions\ms-azuretools.vscode-docker-1.29.3
2024-09-25 19:27:06.319 [error] [uncaught exception in sharedProcess]: Error: ENOENT: no such file or directory, stat 'c:\Users\Alan\.vscode\extensions\extensions.json.vsctmp': EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat 'c:\Users\Alan\.vscode\extensions\extensions.json.vsctmp'
    at o.create (c:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:54:19406)
    at u (c:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:54:19517)
    at $.hb (c:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:59:36674)
    at $.stat (c:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:59:29001)
    at async c.stat (c:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:59:14931)
    at async W.ub (c:\Program Files\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:105:120356)
2024-09-25 19:27:06.327 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:06.334 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:06.344 [info] Marked extension as uninstalled ms-azuretools.vscode-docker-1.29.2
2024-09-25 19:27:06.356 [info] Extension installed successfully: ms-azuretools.vscode-docker vscode-userdata:/c%3A/Users/Alan/.vscode/extensions/extensions.json
2024-09-25 19:27:06.368 [info] Extracted extension to file:///c%3A/Users/Alan/.vscode/extensions/gitpod.gitpod-desktop-0.0.176: gitpod.gitpod-desktop
2024-09-25 19:27:06.379 [info] Renamed to c:\Users\Alan\.vscode\extensions\gitpod.gitpod-desktop-0.0.176
2024-09-25 19:27:06.438 [info] Marked extension as uninstalled gitpod.gitpod-desktop-0.0.174
2024-09-25 19:27:06.623 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:06.627 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:06.659 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:06.662 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:27:06.682 [info] Extension installed successfully: gitpod.gitpod-desktop vscode-userdata:/c%3A/Users/Alan/.vscode/extensions/extensions.json
2024-09-25 19:27:06.927 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:27:06.930 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:30:50.934 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:30:50.940 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:32:00.570 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:32:00.575 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:32:00.917 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:32:00.919 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:32:01.065 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:32:01.067 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:35:07.470 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:35:07.475 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:35:51.918 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:35:51.921 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:37:00.921 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:37:00.925 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:40:08.138 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:40:08.142 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:40:52.915 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:40:52.918 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:40:59.978 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:40:59.983 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:22.320 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:22.332 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:32.369 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:32.384 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:32.655 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:32.660 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:33.810 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:33.813 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:34.052 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:34.059 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:34.346 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:34.351 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:34.569 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:34.577 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:34.773 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:34.782 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:34.992 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:34.999 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:35.354 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:35.361 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.
2024-09-25 19:41:35.374 [warning] [csdevkit]: Couldn't find message for key commands.selectLaunchTargetFramework.
2024-09-25 19:41:35.377 [warning] [csharp]: Couldn't find message for key configuration.dotnet.unitTests.runSettingsPath.markdownDescription.

I don't know if this is important but I use settings sync.

sandy081 commented 1 month ago

I see some extensions are installed in more than one profile and those extensions are still pointing to older versions. Can you please make sure extensions in all profiles are updated. After that restart VS Code twice using --verbose flag and share the shared log every time you restarted?

vs-code-engineering[bot] commented 1 month ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!