vscode: Extension contributed submenus missing with errors in output
Does this issue occur when all extensions are disabled?: No
- VS Code Version: 1.70.0-insider
- OS Version: Darwin x64 21.5.0
VS Code version info
Version: 1.70.0-insider Commit: 052d5b0027f6c9d64c8ca35955cb5117ba94d5d7 Date: 2022-07-13T05:21:34.551Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Darwin x64 21.5.0
The Azure Resource Groups extension has a submenus that aren’t showing up on Insiders, but show up as expected on VS Code Stable. https://github.com/microsoft/vscode-azureresourcegroups/issues/330
The issue only reproduces on insiders 1.70.0-insider. Does not repro on stable (1.69.1)
I’ve verified that this bug impacts GitLens submenus as well, but haven’t had time to log the issue over there yet.
I’ve made a sample extension as a minimal reproduction. https://github.com/alexweininger/vscode-submenu-sample
Steps to Reproduce:
- Open new window of VS Code Insiders (with a folder/files open if you want to verify that the sample submenu disappears)
- Install Submenu sample extension VSIX of the sample extension I made that contributes a submenu to the
editor/title
. - View “Log (Window)” output channel. If there aren’t errors yet, disabling the submenu sample extension, which seems to reload all the extension contributions which causes the error.
- After these errors are shown in the logs, the submenu disappears.
I believe it could be caused by 21147b8
(#154801)
Errors from the “Log (Window)” output channel:
[2022-07-13 00:16:54.982] [renderer7] [error] Duplicate menu identifier api:git.commit: Error: Duplicate menu identifier api:git.commit
at new o (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:697:3734)
at i._handler (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1691:42853)
at i._handle (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1686:26570)
at i.acceptUsers (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1686:26474)
at Function._handleExtensionPoint (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3172:33062)
at E._doHandleExtensionPoints (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3172:31895)
at E._deltaExtensions (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3172:20709)
at async E._handleDeltaExtensions (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:3172:19726)
[2022-07-13 00:16:54.983] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.commit` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.984] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.changes` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.984] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.pullpush` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.984] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.branch` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.984] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.remotes` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.984] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.stash` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.985] [renderer7] [error] [vscode.git]: Menu item references a submenu `git.tags` which is not defined in the 'submenus' section.
[2022-07-13 00:16:54.985] [renderer7] [info] [vscode.git]: `git.commit` is not a valid menu identifier
[2022-07-13 00:16:54.985] [renderer7] [info] [vscode.git]: `git.changes` is not a valid menu identifier
[2022-07-13 00:16:54.985] [renderer7] [info] [vscode.git]: `git.pullpush` is not a valid menu identifier
[2022-07-13 00:16:54.985] [renderer7] [info] [vscode.git]: `git.branch` is not a valid menu identifier
[2022-07-13 00:16:54.986] [renderer7] [info] [vscode.git]: `git.remotes` is not a valid menu identifier
[2022-07-13 00:16:54.986] [renderer7] [info] [vscode.git]: `git.stash` is not a valid menu identifier
[2022-07-13 00:16:54.986] [renderer7] [info] [vscode.git]: `git.tags` is not a valid menu identifier
[2022-07-13 00:16:54.987] [renderer7] [info] [testing.helloworld-sample]: `foo` is not a valid menu identifier
[2022-07-13 00:16:54.987] [renderer7] [error] [testing.helloworld-sample]: Menu item references a submenu `foo` which is not defined in the 'submenus' section.
You can also easily reproduce this by installing and enabled/disabling various extensions that contribute submenus. Ex: GitLens and Azure Resource Groups.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (15 by maintainers)
Commits related to this issue
- allow to reuse a menu id and only to create one when none with the id exists fixes https://github.com/microsoft/vscode/issues/155030 — committed to microsoft/vscode by jrieken 2 years ago
- allow to reuse a menu id and only to create one when none with the id exists (#155042) fixes https://github.com/microsoft/vscode/issues/155030 — committed to microsoft/vscode by jrieken 2 years ago
- allow to reuse a menu id and only to create one when none with the id exists (#155042) fixes https://github.com/microsoft/vscode/issues/155030 — committed to Yoyokrazy/vscode by jrieken 2 years ago
- allow to reuse a menu id and only to create one when none with the id exists (#155042) fixes https://github.com/microsoft/vscode/issues/155030 — committed to microsoft/vscode by jrieken 2 years ago
- Fixes #155030 — committed to jeanp413/vscode by jeanp413 2 years ago
- Fixes #155030 — committed to gitpod-io/openvscode-server by jeanp413 2 years ago
- Merge pull request #158158 from microsoft/joh/fix/155030 Fixes #155030 — committed to gitpod-io/openvscode-server by jrieken 2 years ago
Fix is in
main
and inrelease/1.70
Created a PR https://github.com/microsoft/vscode/pull/158140 fixing this
Verified with latest insiders.
Version: 1.71.0-insider Commit: dd0ed9381aa5d0d43159463ccad1f7e060021580 Date: 2022-08-17T05:20:48.980Z Electron: 19.0.12 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin x64 21.6.0 Sandboxed: Yes
Since this looks like a regression - marking as a candidate for recovery release 2.