Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions are gone in side bar when syncing settings from multiple Windows accounts #168504

Closed
metablaster opened this issue Dec 8, 2022 · 10 comments
Assignees
Labels
extensions Issues concerning extensions info-needed Issue requires more information from poster
Milestone

Comments

@metablaster
Copy link

metablaster commented Dec 8, 2022

Type: Bug

I have 2 Windows accounts, Administrator and standard user account.
I always sign into standard account and use VSCode there normally.

Recently I started VSCode as Administrator to be able to run scripts as Admin and I turned on settings sync while VSCode was run as Admin, thus settings sync is enabled for both Win. accounts.

What happened is that extensions are no longer shown in the action bar -> extensions when I run VSCode as normal user, but this happens only when I open a workspace folder.

What I have tried is:

  1. Uninstall VSCode (was installed system wide)
  2. Deleted %appdata%.vscode for both Win. accounts
  3. Deleted Roaming\Code directory for boath accounts.
  4. Installed VSCode again.

This worked until I run it as Administrator and turned on settings sync on both accounts, after which the problem come back.

I'm not sure what information I could give since I never had this problem and have no idea how to resolve it except to reinstall VSCode and never run it as Admin but that's not a solution because I need it with both Win. accounts.

VS Code version: Code 1.74.0 (5235c6b, 2022-12-05T16:38:16.075Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz (4 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.95GB (10.72GB free)
Process Argv C:\dev\GitHub\WindowsFirewallRuleset --crash-reporter-id f4ba6678-424f-4312-b3c7-78a7cb995f13
Screen Reader no
VM 0%
Extensions (21)
Extension Author (truncated) Version
Bookmarks ale 13.3.1
project-manager ale 12.7.0
vscode-markdownlint Dav 0.48.1
LogFileHighlighter emi 2.16.0
filter-line eve 2.0.1
todo-tree Gru 0.0.220
rainbow-csv mec 3.4.0
remote-ssh ms- 0.92.0
remote-ssh-edit ms- 0.84.0
powershell ms- 2022.11.0
remote-explorer ms- 0.0.3
fix-json oli 0.1.2
vscode-auto-scroll pej 1.1.0
vscode-xml red 0.22.0
vscode-yaml red 1.10.1
vscode-sort-json ric 1.20.0
trailing-spaces sha 0.4.1
code-spell-checker str 2.12.0
highlight-bad-chars wen 0.0.6
markdown-all-in-one yzh 3.5.0
json Zai 2.0.2
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vsccc:30610678
pyindex848:30577860
nodejswelcome1:30587005
282f8724:30602487
gswce1:30612156
iaj6b796:30613358
dbltrim-noruby:30604474
f6dab269:30613381
fim-prod:30623723
vscsb:30625888

EDIT:

screenshot when opened in one workspace folder:

sreenshot when opened in another workspace folder:

screenshot when no workspace is opened:

UPDATE

I would like to update my issue and report that this problem is related to VSCode 1.74, I uninstalled VSCode and installed previous version 1.73.1 and the problem is no longer present! extension are shown in action bar in both Windows account and regardless if workspace is opened or not.

However it's not completely resolved, one issue remains which is that if I disable certain extensions in one windows account (run as Administrator) the change is not reflected in another windows user account (normal run) even though I'm syncing settings for both accounts with same Microsoft account.

So this are now 2 related issues, one present in VSCode 1.74 and another present since before.

I think there is no need to provide steps to reproduce as it's self explanatory, but if you need any additional information such as logs let me know.

@sandy081
Copy link
Member

sandy081 commented Dec 9, 2022

@metablaster Thanks for reporting the issue and lets focus on the issue in 1.74. Can you please confirm following

  • When extensions are not shown in UI, are the extensions running? Is it just extensions are not visible?
  • Does reloading the window fixes it?
  • Can you please share this file - F1 > Extensions: Open Extensions Folder > extensions.json

@metablaster
Copy link
Author

metablaster commented Dec 9, 2022

When extensions are not shown in UI, are the extensions running? Is it just extensions are not visible?

I see extensions are working as expected, for ex. when I open PS script the PowerShell extension fires up and provides it's services,
Same is true for other extensions which are language agnostic, but didn't check them all.

But extensions are not shown in the actions bar.

Output of the extension host is clear:

2022-12-09 13:51:54.689 [info] Extension host with pid 9036 started
2022-12-09 13:51:54.689 [info] Skipping acquiring lock for c:\Users\User\AppData\Roaming\Code\User\workspaceStorage\3ba295179874fb39a80228b5cd4f619c.
2022-12-09 13:51:54.824 [info] ExtensionService#_doActivateExtension emilast.LogFileHighlighter, startup: false, activationEvent: 'onLanguage:log'
2022-12-09 13:51:54.841 [info] ExtensionService#_doActivateExtension pejmannikram.vscode-auto-scroll, startup: false, activationEvent: 'onLanguage:log'
2022-12-09 13:51:54.844 [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft'
2022-12-09 13:51:54.875 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2022-12-09 13:51:54.880 [info] ExtensionService#_doActivateExtension yzhang.markdown-all-in-one, startup: true, activationEvent: 'workspaceContains:README.md'
2022-12-09 13:51:55.023 [info] ExtensionService#_doActivateExtension vscode.markdown-math, startup: false, activationEvent: 'api', root cause: yzhang.markdown-all-in-one
2022-12-09 13:51:55.074 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2022-12-09 13:51:55.100 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2022-12-09 13:51:55.323 [info] Eager extensions activated
2022-12-09 13:51:55.368 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.372 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.377 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.395 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl-recommender, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.406 [info] ExtensionService#_doActivateExtension alefragnani.Bookmarks, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.421 [info] ExtensionService#_doActivateExtension alefragnani.project-manager, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.442 [info] ExtensionService#_doActivateExtension Gruntfuggly.todo-tree, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.482 [info] ExtensionService#_doActivateExtension shardulm94.trailing-spaces, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:55.540 [info] ExtensionService#_doActivateExtension streetsidesoftware.code-spell-checker, startup: false, activationEvent: 'onStartupFinished'
2022-12-09 13:51:57.352 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2022-12-09 13:51:58.447 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2022-12-09 13:51:58.450 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2022-12-09 13:51:58.472 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2022-12-09 13:52:07.043 [info] ExtensionService#_doActivateExtension ms-vscode.powershell, startup: false, activationEvent: 'onLanguage:powershell'
2022-12-09 13:52:07.460 [info] ExtensionService#_doActivateExtension mechatroner.rainbow-csv, startup: false, activationEvent: 'onLanguage:plaintext'

Does reloading the window fixes it?

No it doesn't.

CTRL + SHIFT + P Developer:Reload Window does not resolve the problem.

Restarting VSCode also doesn't help.

Can you please share this file - F1 > Extensions: Open Extensions Folder > extensions.json

zippyshare.com -> extensions.zip

Sorry I forgot to format the file.

@sandy081 sandy081 added info-needed Issue requires more information from poster extensions Issues concerning extensions labels Dec 9, 2022
@sandy081 sandy081 added this to the January 2023 milestone Dec 9, 2022
@sandy081
Copy link
Member

sandy081 commented Dec 9, 2022

Enable log level to trace - F1 > Set Log Level... and Can you also please share following logs

  • F1 > Open View... > Shared
  • F1 > Open View... > Window
  • F1 > Open View... > Extension Host
  • Do you see any thing suspicious here - F1 > Toggle Developer Tools > Console/Network

I am not able to access the extensions.json file from above comment. Can you please upload it to GitHub?

@metablaster
Copy link
Author

metablaster commented Dec 9, 2022

I am not able to access the extensions.json file from above comment. Can you please upload it to GitHub?

Sorry I didn't know I can attach file by simply dragging it here, that's definitely new to me, had to google this out...

Here are the logs for both user accounts you requested:

logs.zip

EDIT:

Do you see any thing suspicious here - F1 > Toggle Developer Tools > Console/Network

I'll repro the problem and take a look

@metablaster
Copy link
Author

metablaster commented Dec 9, 2022

Following is what I found suspicious in developer tools:

TRACE Error while resolving configuration file 'file:///c%3A/dev/GitHub/WindowsFirewallRuleset/.vscode/tasks.json': Unable to read file 'c:\dev\GitHub\WindowsFirewallRuleset\.vscode\tasks.json' (Error: Unable to resolve nonexistent file 'c:\dev\GitHub\WindowsFirewallRuleset\.vscode\tasks.json')

That's file in my repo which I don't use at all and didn't change it for some 2 years, it was present in previous VSCode versions.

TMScopeRegistry.ts:47 Overwriting grammar scope name to file mapping for scope text.log.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/log/syntaxes/log.tmLanguage.json.
New grammar file: file:///c%3A/Users/User/.vscode/extensions/emilast.logfilehighlighter-2.16.0/syntaxes/log.tmLanguage
register @ TMScopeRegistry.ts:47
L @ TMGrammarFactory.ts:73
H @ abstractTextMateService.ts:240
await in H (async)
createTokenizationSupport @ abstractTextMateService.ts:264
i @ tokenizationRegistry.ts:146
resolve @ tokenizationRegistry.ts:140
getOrCreate @ tokenizationRegistry.ts:72
(anonymous) @ abstractTextMateService.ts:165
d @ extensionsRegistry.ts:144
acceptUsers @ extensionsRegistry.ts:135
Rb @ abstractExtensionService.ts:1287
Pb @ abstractExtensionService.ts:1220
Ac @ electronExtensionService.ts:597
await in Ac (async)
Yb @ electronExtensionService.ts:559
wb @ abstractExtensionService.ts:777
await in wb (async)
(anonymous) @ electronExtensionService.ts:115
requestIdleCallback (async)
e.runWhenIdle @ async.ts:1163
(anonymous) @ electronExtensionService.ts:114
Promise.then (async)
jc @ electronExtensionService.ts:112
E @ sandboxExtensionService.ts:12
j @ instantiationService.ts:119
t @ instantiationService.ts:245
s @ instantiationService.ts:234
r @ instantiationService.ts:223
q @ instantiationService.ts:163
m @ instantiationService.ts:147
get @ instantiationService.ts:61
eb @ layout.ts:233
(anonymous) @ workbench.ts:152
invokeFunction @ instantiationService.ts:68
startup @ workbench.ts:144
open @ desktop.main.ts:120
await in open (async)
le @ desktop.main.ts:386
d.load.configureDeveloperSettings @ workbench.js:2801
(anonymous) @ workbench.js:2673
a._invokeFactory @ workbench.js:1460
a.complete @ workbench.js:1470
a._onModuleComplete @ workbench.js:2100
a._onModuleComplete @ workbench.js:2112
a._resolve @ workbench.js:2057
a.defineModule @ workbench.js:1700
h @ workbench.js:2150
(anonymous) @ workbench.common.main.ts:145
(anonymous) @ fake:1
TMScopeRegistry.ts:47 Overwriting grammar scope name to file mapping for scope source.yaml.
Old grammar file: file:///c%3A/Program%20Files/Microsoft%20VS%20Code/resources/app/extensions/yaml/syntaxes/yaml.tmLanguage.json.
New grammar file: file:///c%3A/Users/User/.vscode/extensions/redhat.vscode-yaml-1.10.1/syntaxes/yaml.tmLanguage.json

I don't know what this means, perhaps extension is registering it's services?
these are surely from YAML extension from red-hat and Log file highlighter extension.

WARN [redhat.vscode-yaml]: Cannot register 'redhat.telemetry.enabled'. This property is already registered.
log.ts:304
INFO Creating lazy extension host: contains 1 extension(s): wengerk.highlight-bad-chars.

This is likely not issue because Cannot register 'redhat.telemetry.enabled' was present in VSCode 1.73.1

TRACE EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, stat 'c:\dev\GitHub\WindowsFirewallRuleset\node_modules'
    at l (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:34:4023)
    at i.Y (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:39:36565)
    at i.stat (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:39:29933)

This is likely due to extension which uses node.exe which is XML extension from red-hat

The files which were reported as "warning" from the log above are here:

devtools.zip

I don't see anything wrong in the network tab.

@sandy081
Copy link
Member

Could be a duplicate of #168703

May I know if the extensions views/sections are collapsed? Can you please do following and let me know if it worked?

  • Expand the extensions views/sections and reload the window?

@metablaster
Copy link
Author

Yes, when I expand extension views and then reload window all of the extensions appear in all views.

But those views which are collapsed after reloading the window don't show any.
I've tested in both Win. accounts and that works.

Also worth noting that if I leave the views expanded (after window reload) extensions appear normally on fresh start of VSCode in expanded views but not in collapsed ones.


May I know if syncing (with same MS account in VSCode) but on different OS users accounts should sync which extensions are installed and which extension views are expanded or not is by design?

For example if uninstall one extension in standard account that change is not reflected in Admin account, even though both are synced with same MS account.
In another user account I need to explicitly uninstall extension.

@sandy081
Copy link
Member

May I know if syncing (with same MS account in VSCode) but on different OS users accounts should sync which extensions are installed and which extension views are expanded or not is by design?

Extensions installation and uninstallation shall be synced automatically. Expansion state of views is not synced.

For example if uninstall one extension in standard account that change is not reflected in Admin account, even though both are synced with same MS account. In another user account I need to explicitly uninstall extension.

Please follow these steps and share logs

  • Set log level to trace - F1 > Set Log Level... > Trace
  • On standard account: Uninstall an extension
  • Wait for a moment for sync to kick in: Share the log - F1 > Open View... > Settings Sync
  • Go to admin account: Wait for a moment for sync to kick in: Share the log - F1 > Open View... > Settings Sync

@metablaster
Copy link
Author

Sadly I could no longer reproduce this problem the way I described initially but with additional testing I see what I was referring to, this is partially reproducible but only with disabled extensions with the following behavior:

  1. Uninstall a disabled extension in standard account wait for sync to happen
  2. Open VSCode as Admin and the extension is uninstalled as expected but extension view still shows the extension offered for install as shown in the image below (vscode-icons was uninstalled):

after uninstall

  1. Then after "reload window" the extension view no longer shows or offers this same extension for install, it's gone from extensions view.

I tested the other way around as well (install extension) but the behavior is as expected as follows:

  1. Install extension in user account and disable it
  2. Open VSCode as Admin and the extension is installed and disabled as expected, as shown in the image below:

after install


But I think I know why this happens, this same extension vscode-icons requires window reload after uninstall if it was enabled, but if it's disabled no reload is offered after uninstall, therefore to get the expected result one has to reload manually.

I've collected logs for both cases which indicate and sync works:

vscode-icons-trace.zip

Expected behavior:

If a disabled extension is uninstalled in one OS account, the extension view does not show it as uninstalled nor offer it for install in other OS accounts afterwards.

Alternatively if this is by design, then a user in other OS account should be suggested to reload window for the change to take effect on extensions view.

@sandy081
Copy link
Member

Open VSCode as Admin and the extension is uninstalled as expected but extension view still shows the extension offered for install as shown in the image below (vscode-icons was uninstalled):

Yes, this is true and same even if you uninstall manually. We do not remove entries automatically from the view. If you refresh the view, it will go away and it does not require reload.

Open VSCode as Admin and the extension is installed and disabled as expected, as shown in the image below:

In this case, we automatically adds extension to the view.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants