You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v1.33.0 disabled extension appears to be running #71752
bugIssue identified by VS Code Team member as probable bugextension-hostExtension host issuesimportantIssue identified as high-priorityverifiedVerification succeeded
I can reliably reproduce this problem. It started happening today, following today's VS Code update (March 2019, 1.33.0). It is closely related to #21930.
I have formatOnSave=false but I am suddenly seeing my React JS files being modified upon save (the JSX is being mangled). I have the vscode-js-css-html-formatter extension installed, but disabled. Somehow, it appears to be functional (and also abusing formatOnSave=false).
The symptoms seem to suggest that the disabled extension is not actually disabled. If I uninstall the extension there is no indication that I need to reload VS Code to complete the uninstallation yet the save-on-format behavior is still present, post-uninstall.
If I uninstall the extension and actually reload VS Code, then the format-on-save behavior has gone and everything is good.
Any chance that v1.33.0 introduced a bug allowing disabled extensions, and uninstalled extension but VS-Code-not-yet-reloaded, to continue to run? Or is this extension somehow escaping whatever sandbox you have for disabled extensions?
This problem does not repro on v1.32.3.
VS Code version: Code 1.33.0 (0dd516d, 2019-04-04T15:11:32.076Z)
OS version: Darwin x64 16.7.0
Reacted by Igor Krupenja, Michael and Aymeric Robini
john (@john-aws) I see reload action when I uninstall/disable the extension (vscode-JS-CSS-HTML-formatter). Can you please check if the extension is shown when you run the command Show Running Extensions before you disbaled/uninstalled it?
Ran across this issue as well. I have a bug report with system info at #71769.
Sandeep Somavarapu (@sandy081) The disabled-but-not-really-disabled extension doesn't show up under Show Running Extensions.
Johannes Rieken (@jrieken) I am alleviating this issue temporarily by just uninstalling the extensions I don't need. I guess if you have some extensions activated for only certain workspaces, you could be in a tough spot.
Sandeep Somavarapu (@sandy081) confirmed that the extension does not show up under Show Running Extensions after disabling but before uninstalling. In this state it does still appear to be reformatting my JSX.
Johannes Rieken (@jrieken) to disable the extension, I used the native VS Code Extension Manager, clicked the settings cog, and chose Disable (not Disable (Workspace)).
If it's technically possible for a disabled extension to run (I don't know for sure if it is, but it seems to be), shouldn't VS Code exert more control? A clear preference from the user to disable an extension would ideally take the decision out of the hands of the extension writer.
john (@john-aws) It should not happen. When a user disables an extension and reload the window, it should not run. Can you please provide the steps for me to reproduce, also the set up (extensions you have) would be helpful too?
Today Johannes Rieken (@jrieken) has seen similar issue and we debugged it together. Outcome is that we are starting the extension host with all scanned extensions and not filtering the disabled extensions. See following code
Reverted the fix. I digged deep and above fix is not correct as the bug is not on renderer side. Root cause is in extension host.
We create extension host with all extensions
We start it after with only enabled extensions
We are not holding those activation events those come between ext host is created and ext host is started. This is causing disabled extensions to activate.
bugIssue identified by VS Code Team member as probable bugextension-hostExtension host issuesimportantIssue identified as high-priorityverifiedVerification succeeded
Activity
john-aws commentedon Apr 5, 2019
Just noticed this bug raised against the extension: Formatter must unregister when being disabled
sandy081 commentedon Apr 5, 2019
john (@john-aws) I see reload action when I uninstall/disable the extension (vscode-JS-CSS-HTML-formatter). Can you please check if the extension is shown when you run the command
Show Running Extensionsbefore you disbaled/uninstalled it?jrieken commentedon Apr 5, 2019
How did you disable it? In the sense of disabling the extension or disabling it with its setting?
szhu commentedon Apr 5, 2019
Ran across this issue as well. I have a bug report with system info at #71769.
Sandeep Somavarapu (@sandy081) The disabled-but-not-really-disabled extension doesn't show up under
Show Running Extensions.Johannes Rieken (@jrieken) I am alleviating this issue temporarily by just uninstalling the extensions I don't need. I guess if you have some extensions activated for only certain workspaces, you could be in a tough spot.
john-aws commentedon Apr 5, 2019
Sandeep Somavarapu (@sandy081) confirmed that the extension does not show up under
Show Running Extensionsafter disabling but before uninstalling. In this state it does still appear to be reformatting my JSX.Johannes Rieken (@jrieken) to disable the extension, I used the native VS Code Extension Manager, clicked the settings cog, and chose Disable (not Disable (Workspace)).
sandy081 commentedon Apr 8, 2019
If it is not shown under running extensions, the extension should not be running unless there is a bug in it.
alexandrudima any insights on this?
john-aws commentedon Apr 9, 2019
If it's technically possible for a disabled extension to run (I don't know for sure if it is, but it seems to be), shouldn't VS Code exert more control? A clear preference from the user to disable an extension would ideally take the decision out of the hands of the extension writer.
sandy081 commentedon Apr 10, 2019
john (@john-aws) It should not happen. When a user disables an extension and reload the window, it should not run. Can you please provide the steps for me to reproduce, also the set up (extensions you have) would be helpful too?
szhu commentedon Apr 11, 2019
Sandeep Somavarapu (@sandy081) my #71752 has specific repro steps.
(sorry if you were already aware -- just making sure!)
4 remaining items
sandy081 commentedon Apr 16, 2019
alexandrudima
Today Johannes Rieken (@jrieken) has seen similar issue and we debugged it together. Outcome is that we are starting the extension host with all scanned extensions and not filtering the disabled extensions. See following code
https://github.com/Microsoft/vscode/blob/f7b33b613ed05e3649da8fb93cec88dac7d85856/src/vs/workbench/services/extensions/electron-browser/extensionService.ts#L433-L440
Not sure why are we not filtering out disabled extensions if it is initial start?
Fix #71752
Merge pull request #72436 from Microsoft/sandy081/fix71752
sandy081 commentedon Apr 17, 2019
Reverted the fix. I digged deep and above fix is not correct as the bug is not on renderer side. Root cause is in extension host.
Will come up with the accurate fix.
Fix #71752
Merge pull request #72480 from Microsoft/sandy081/fix71752
aeschli commentedon May 8, 2019
Verified by disabling the vscode-js-css-html-formatter, relaod and save a js file. No formatting happens.