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

VSCode starts with disabled extensions #82359

Closed
andrekampll opened this issue Oct 11, 2019 · 11 comments
Closed

VSCode starts with disabled extensions #82359

andrekampll opened this issue Oct 11, 2019 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release extensions Issues concerning extensions verified Verification succeeded

Comments

@andrekampll
Copy link

Issue Type: Bug

I updated VSCode yesterday and now everytime I start VScode it starts with all my extensions disabled. Tried reinstalling VSCode, but did not work.

All my extensions appear in the "Disabled" area. The only solution to make it work is if I "Disable all extensions" and then "Enable all extensions".

If after this I close vscode, it starts again with disabled extensions.

VS Code version: Code 1.39.1 (88f15d1, 2019-10-10T23:31:28.683Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.89GB (6.74GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (54)
Extension Author (truncated) Version
rainbow-brackets 2gu 0.0.6
better-comments aar 2.0.5
ignoregit And 1.0.1
color-info bie 0.5.1
npm-intellisense chr 1.3.0
path-intellisense chr 1.4.2
vscode-eslint dba 1.9.1
gitlens eam 10.1.1
EditorConfig Edi 0.14.1
vscode-npm-script eg2 0.3.9
LogFileHighlighter emi 2.6.0
auto-close-tag for 0.5.6
auto-using Fud 0.7.9
gc-excelviewer Gra 2.1.32
beautify Hoo 1.5.0
icon-fonts idl 2.2.2
changelog jac 0.0.6
search-node-modules jas 1.3.0
csharpextensions jch 1.3.0
node-module-intellisense lei 1.5.0
csharpfixformat Leo 0.0.84
csharp-colors log 0.1.7
bash-ide-vscode mad 1.3.3
CamelCase Mar 1.0.4
change-string-case max 1.1.1
rainbow-csv mec 1.3.1
git-graph mhu 1.17.0
gitignore mic 1.0.1
dotenv mik 1.0.1
azure-pipelines ms- 1.157.4
mssql ms- 1.6.0
remote-ssh ms- 0.47.1
remote-ssh-edit ms- 0.47.1
remote-ssh-explorer ms- 0.47.1
remote-wsl ms- 0.39.9
azure-account ms- 0.8.6
csharp ms- 1.21.4
powershell ms- 2019.9.0
debugger-for-chrome msj 4.12.0
color-highlight nau 2.3.0
indent-rainbow ode 7.4.0
material-icon-theme PKi 3.9.1
remote-vscode raf 1.1.0
RocketseatReactJS roc 2.2.0
RocketseatReactNative roc 2.2.0
bash-debug rog 0.3.6
bash-beautify sha 0.1.1
code-settings-sync Sha 3.4.3
markdown-preview-enhanced shd 0.4.3
guides spy 0.9.3
ansible-autocomplete tim 0.0.2
nodejs-extension-pack wad 0.1.9
vscode-wakatime Wak 2.2.0
JavaScriptSnippets xab 1.7.2

(1 theme extensions excluded)

@andrekampll
Copy link
Author

Visual info:
ErrorVSCode

@andrekampll
Copy link
Author

Errors on startup (Disabled extensions) in developer tools:

/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3390 TypeError: Cannot read property '__metadata' of undefined
    at d.readFile.then.e (/C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3527)
_logMessageInConsole @ /C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:3390

@isidorn
Copy link
Contributor

isidorn commented Oct 11, 2019

Ok this is another instance of #82318
Adding candidate, assigning to @sandy081

@jrieken
Copy link
Member

jrieken commented Oct 14, 2019

@joaomoreno a more complete stack trace can be found here: #82181 (comment)

@joaomoreno
Copy link
Member

Got a repro:

diff --git a/src/vs/workbench/services/extensions/node/extensionPoints.ts b/src/vs/workbench/services/extensions/node/extensionPoints.ts
index 17fdf323c7..15a9cb9889 100644
--- a/src/vs/workbench/services/extensions/node/extensionPoints.ts
+++ b/src/vs/workbench/services/extensions/node/extensionPoints.ts
@@ -50,7 +50,8 @@ class ExtensionManifestParser extends ExtensionManifestHandler {
 	public parse(): Promise<IExtensionDescription> {
 		return pfs.readFile(this._absoluteManifestPath).then((manifestContents) => {
 			const errors: json.ParseError[] = [];
-			const manifest = json.parse(manifestContents.toString(), errors);
+			let manifest = json.parse(manifestContents.toString(), errors);
+			manifest = undefined!;
 			if (errors.length === 0) {
 				if (manifest.__metadata) {
 					manifest.uuid = manifest.__metadata.id;

image

Likely culprit is 479563e cc @aeschli

@joaomoreno
Copy link
Member

joaomoreno commented Oct 14, 2019

@aeschli 479563e was a dangerous change because while JSON.parse would throw on parse errors, our custom json.parse doesn't and while its documentation reads On invalid input, the parser tries to be as fault tolerant as possible, but still return a result. it seems that there are cases in which the result it returns is undefined, which is what is happening here. The code happily continues and assumes manifest is an object.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 14, 2019

Repro steps:

  1. Pick any built-in extension package.json file and make it empty
  2. Start VS Code

@joaomoreno
Copy link
Member

Pushing a fix for this. Next steps to improve stability are #82504

@aeschli
Copy link
Contributor

aeschli commented Oct 14, 2019

Ah I see. The difference is that our parser doesn't emit an error if the content is empty, while JSON.parse does.

joaomoreno added a commit that referenced this issue Oct 14, 2019
@joaomoreno
Copy link
Member

If you are hitting this issue, there's no real workaround for now, somehow you have a corrupted built-in extension manifest file. That should not block all other extensions, of course, so we're pushing a fix for the 1.39.2 recovery release. Until that's released, you can either reinstall VS Code or find the corrupt package.json and fix it.

@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Oct 15, 2019
@isidorn isidorn added the verified Verification succeeded label Oct 15, 2019
@wgv-srbrills
Copy link

Verified that the issue is resolved with the latest version 1.39.2.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release extensions Issues concerning extensions verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants