microsoft / vscode

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

All extensions unexpectedly removed #179630

Closed mikew closed 1 year ago

mikew commented 1 year ago

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

Steps to Reproduce:

  1. Start work
  2. Go to the washroom
  3. Come back and wonder where your extensions went

Seriously, I went to the bathroom and came back and all of my extensions have been removed:

Screenshot 2023-04-10 at 5 11 30 PM

I work from home, and live alone, so no one else would have had access. I use settings sync, and my settings are still there (though I've manually backed them up because my trust is a little shook right now), but I did see this in the settings sync output:

2023-04-10 17:05:29.958 [info] Extensions (test): Uninstalled local extension. dbaeumer.vscode-eslint
2023-04-10 17:05:29.962 [info] Extensions (test): Uninstalled local extension. editorconfig.editorconfig
2023-04-10 17:05:29.967 [info] Extensions (test): Uninstalled local extension. andrsdc.base16-themes
2023-04-10 17:05:29.967 [info] Extensions (test): Uninstalled local extension. graphql.vscode-graphql-syntax
2023-04-10 17:05:30.003 [info] Extensions (test): Uninstalled local extension. ms-vscode.cmake-tools
2023-04-10 17:05:30.018 [info] Extensions (test): Uninstalled local extension. ms-vscode.cpptools
2023-04-10 17:05:30.026 [info] Extensions (test): Uninstalled local extension. redhat.vscode-yaml
2023-04-10 17:05:30.044 [info] Extensions (test): Uninstalled local extension. streetsidesoftware.code-spell-checker
2023-04-10 17:05:30.074 [info] Extensions (test): Uninstalled local extension. ms-vscode-remote.remote-ssh
2023-04-10 17:05:30.074 [info] Extensions (test): Uninstalled local extension. twxs.cmake
2023-04-10 17:05:30.075 [info] Extensions (test): Uninstalled local extension. tboox.xmake-vscode
2023-04-10 17:05:30.075 [info] Extensions (test): Uninstalled local extension. formulahendry.auto-close-tag
2023-04-10 17:05:30.081 [info] Extensions (test): Uninstalled local extension. ms-python.python
2023-04-10 17:05:30.082 [info] Extensions (test): Uninstalled local extension. christian-kohler.path-intellisense
2023-04-10 17:05:30.082 [info] Extensions (test): Uninstalled local extension. esbenp.prettier-vscode
2023-04-10 17:05:30.096 [info] Extensions (test): Uninstalled local extension. ms-python.vscode-pylance
2023-04-10 17:05:30.097 [info] Extensions (test): Uninstalled local extension. bierner.markdown-mermaid
2023-04-10 17:05:30.097 [info] Extensions (test): Uninstalled local extension. hashicorp.terraform
2023-04-10 17:05:30.126 [info] Extensions (test): Uninstalled local extension. ms-vscode-remote.remote-wsl
2023-04-10 17:05:30.195 [info] Extensions (test): Uninstalled local extension. vscodevim.vim
2023-04-10 17:05:30.237 [info] Extensions (test): Uninstalled local extension. ms-vscode-remote.remote-ssh-edit
2023-04-10 17:05:30.288 [info] Extensions (test): Uninstalled local extension. graphql.vscode-graphql
2023-04-10 17:05:30.314 [info] Extensions (test): Uninstalled local extension. timonwong.shellcheck
mikew commented 1 year ago

And since I use Settings Sync, I'm just watching all my extensions be removed from every machine I use. I see the (test) above, and below on this new machine:

2023-04-10 17:03:17.009 [info] Syncing profile. test
2023-04-10 17:03:17.020 [info] Settings (test): No changes found during synchronizing settings.
2023-04-10 17:03:17.025 [info] Keybindings (test): No changes found during synchronizing keybindings.
2023-04-10 17:03:17.028 [info] Snippets (test): No changes found during synchronizing snippets.
2023-04-10 17:03:17.030 [info] Tasks (test): No changes found during synchronizing tasks.
2023-04-10 17:03:17.038 [info] GlobalState (test): No changes found during synchronizing ui state.
2023-04-10 17:05:17.390 [info] Extensions (test): Updated remote extensions. Removed: ["andrsdc.base16-themes","bierner.markdown-mermaid","christian-kohler.path-intellisense","dbaeumer.vscode-eslint","editorconfig.editorconfig","esbenp.prettier-vscode","formulahendry.auto-close-tag","graphql.vscode-graphql","graphql.vscode-graphql-syntax","hashicorp.terraform","ms-python.python","ms-python.vscode-pylance","ms-vscode-remote.remote-ssh","ms-vscode-remote.remote-ssh-edit","ms-vscode-remote.remote-wsl","ms-vscode.cmake-tools","ms-vscode.cpptools","redhat.vscode-yaml","streetsidesoftware.code-spell-checker","tboox.xmake-vscode","timonwong.shellcheck","twxs.cmake","vscodevim.vim"].

If I'm losing my extensions because of a quirk when testing a workaround for something else, oh boy, I'm not impressed right now.

sandy081 commented 1 year ago

@mikew Very unfortunate about your extensions getting removed and sorry about that. You can restore the extensions by following this guide - https://code.visualstudio.com/docs/editor/settings-sync#_restoring-data

Looks like the extensions are removed from the test profile. Can you please provide the complete settings sync log of which you provided in the description. Can you also please share the log - F1 > Open View > Shared - during the same session that you saw extensions are removed?

mikew commented 1 year ago

The session is long closed, not sure if the logs would still exist. The out from my comment here was not using the test profile.

sandy081 commented 1 year ago

The session is long closed, not sure if the logs would still exist. The out from https://github.com/microsoft/vscode/issues/179630#issuecomment-1502332214 was not using the test profile.

As logged, extensions were removed only from the test profile.

mikew commented 1 year ago

As selectively copied from the logs, sure. In practice, my editor did not say it was using my test profile, yet my color scheme and spell check extensions were missing.

sandy081 commented 1 year ago

It seems the log in the description also says it removed extensions from the test profile. Can you please confirm if the extensions from your default profile are removed? May be switch to default profile and check?

mikew commented 1 year ago

Here's a screenshot showing I'm already on the Default profile on one machine that had all its extensions removed:

Screenshot 2023-04-11 at 7 14 50 PM

the description also says it removed extensions from the test profile

Is that a thing vscode can even do? On this macbook, looking through the extension folder (and in extensions.json), there's nothing associating them with profiles.

sandy081 commented 1 year ago

Is that a thing vscode can even do? On this macbook, looking through the extension folder (and in extensions.json), there's nothing associating them with profiles.

Yes. Extensions can be associated to profiles. The way it works is extensions are installed in the extensions folder and there is a manifest file extensions.json for each profile consisting of extensions associated to this profile. The extensions.json file in the extensions folder is for the default profile. You can check the extensions.json file for other profiles in the user data directory. Open user data folder using command F1 > Developer: Open User Data Folder and go to User directory and there there will be a profiles folder under which you have folder per profile. You can find extensions.json per profile in the profile folder.

LennardFi commented 1 year ago

Today the same happened to me. I used VSCode on the Web and synced it there. Today I was using a locally installed VSCode instance. Shortly after starting it, it synced the cloud state and removed all extensions. Luckily I have a Linux system that wasn't corrupted. I could fix it for myself by disabling the settings sync by deleting all cloud-stored data and switching to my Linux system. There I was able to restart the sync process and could upload a clean version.

But in the progress of fixing the problem, I tried to reset my synced extensions.json file with an older version. VSCode didn't react to it and couldn't replace the version. (I was using the actions in the settings sync activity panel.) My bad I also had to restart VSCode since then, so no log I guess.

I am using version 1.77.3

sandy081 commented 1 year ago

@LennardFi Do you have any profiles created? Can you please go to Settings Sync Data view and let us know which machine has removed the extensions? Previous session logs are still persisted in the disk - F1 - Open Logs Folder - is it possible to get us logs?

vscodenpa commented 1 year 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!

mikew commented 1 year ago

This happened to me, again. Was out at a cafe working, went for a walk, laptop died in my bag, plugged it in at home, bam, no extensions.

I have logs from the session at the cafe and then all extensions being removed.

sandy081 commented 1 year ago

I have logs from the session at the cafe and then all extensions being removed.

Can you please share the logs? Are you using profile and Are these removed extensions belong to a profile? Do you have any extensions installed in default profile? Do you have settings sync on?