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

Extension contributed submenus missing with errors in output #155030

Closed
alexweininger opened this issue Jul 13, 2022 · 16 comments · Fixed by #155042 or #158140
Closed

Extension contributed submenus missing with errors in output #155030

alexweininger opened this issue Jul 13, 2022 · 16 comments · Fixed by #155042 or #158140
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 menus Menu items and widget issues verified Verification succeeded

Comments

@alexweininger
Copy link
Member

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: 052d5b0
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. microsoft/vscode-azureresourcegroups#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:

  1. Open new window of VS Code Insiders (with a folder/files open if you want to verify that the sample submenu disappears)
  2. Install Submenu sample extension VSIX of the sample extension I made that contributes a submenu to the editor/title.
  3. 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.
  4. 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.
Screen.Recording.2022-07-13.at.12.25.59.AM.mov

You can also easily reproduce this by installing and enabled/disabling various extensions that contribute submenus. Ex: GitLens and Azure Resource Groups.

@gjsjohnmurray
Copy link
Contributor

@jrieken could this be a consequence of your recent work on menus?

@jrieken jrieken assigned jrieken and unassigned roblourens Jul 13, 2022
@jrieken jrieken added bug Issue identified by VS Code Team member as probable bug menus Menu items and widget issues and removed triage-needed labels Jul 13, 2022
@jrieken
Copy link
Member

jrieken commented Jul 13, 2022

Yes. Menu identifiers need to be unique (while they were using a different identity before). I think for contributed submenus this needs to be relaxed

@jrieken jrieken added this to the July 2022 milestone Jul 13, 2022
@jrieken
Copy link
Member

jrieken commented Jul 13, 2022

The error mentions a different menu identifier (Error: Duplicate menu identifier api:git.commit) but I can understand how this happens. I will push a fix

@alexweininger
Copy link
Member Author

@jrieken I'm still able to reproduce this on the latest insiders version.

[2022-07-14 09:23:54.038] [renderer7] [info] [testing.submenu-sample]: `foo` is not a valid menu identifier
[2022-07-14 09:23:54.040] [renderer7] [error] [testing.submenu-sample]: Menu item references a submenu `foo` which is not defined in the 'submenus' section.

Version: 1.70.0-insider
Commit: e0a65a9
Date: 2022-07-14T05:17:37.220Z
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

@chrisdias
Copy link
Member

According to @fiveisprime this still repros

@chrisdias chrisdias reopened this Jul 19, 2022
@VSCodeTriageBot VSCodeTriageBot removed the insiders-released Patch has been released in VS Code Insiders label Jul 19, 2022
@jrieken
Copy link
Member

jrieken commented Jul 20, 2022

/needsMoreInfo

Screenshot 2022-07-20 at 08 28 13

Please update your steps and sample so that we can reproduce this

@VSCodeTriageBot VSCodeTriageBot added the ~info-needed Issue requires more information from poster (with bot comment) label Jul 20, 2022
@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot added info-needed Issue requires more information from poster and removed ~info-needed Issue requires more information from poster (with bot comment) labels Jul 20, 2022
@alexweininger
Copy link
Member Author

alexweininger commented Jul 27, 2022

Still investigating this issue, it seems to be related to submenu merging.

@isidorn
Copy link
Contributor

isidorn commented Aug 4, 2022

Let's assign to August for an investigation.
I also asked @alexweininger to provide more info. For example if you build vscode out of source https://github.com/microsoft/vscode/wiki/How-to-Contribute and you revert 21147b8 can you still repro?

@isidorn isidorn added this to the August 2022 milestone Aug 4, 2022
@isidorn isidorn self-assigned this Aug 9, 2022
@isidorn isidorn added the candidate Issue identified as probable candidate for fixing in the next release label Aug 11, 2022
@isidorn
Copy link
Contributor

isidorn commented Aug 11, 2022

Since this looks like a regression - marking as a candidate for recovery release 2.

@jeanp413
Copy link
Contributor

Created a PR #158140 fixing this

@isidorn
Copy link
Contributor

isidorn commented Aug 15, 2022

@jeanp413 awesome, thanks a lot!
@jrieken just came back from vacation, and will review the PR and investigate more in the bug. We quickly glanced at the PR together and it seems to be fixing the right thing.

@alexweininger we expect to have a stable release on Wednesday that will have a fix for this issue. Thanks and sorry about the breakage!

@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Aug 15, 2022
@jrieken jrieken reopened this Aug 15, 2022
@VSCodeTriageBot VSCodeTriageBot removed the unreleased Patch has not yet been released in VS Code Insiders label Aug 15, 2022
@jrieken jrieken closed this as completed Aug 15, 2022
@jrieken
Copy link
Member

jrieken commented Aug 15, 2022

Fix is in main and in release/1.70

@isidorn isidorn removed their assignment Aug 15, 2022
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Aug 15, 2022
@jrieken
Copy link
Member

jrieken commented Aug 17, 2022

@alexweininger Can you please verify this with latest insiders and/or 1.70.2 release candidate

@alexweininger
Copy link
Member Author

alexweininger commented Aug 17, 2022

Verified with latest insiders.

Version: 1.71.0-insider
Commit: dd0ed93
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

jeanp413 added a commit to gitpod-io/openvscode-server that referenced this issue Aug 18, 2022
jeanp413 pushed a commit to gitpod-io/openvscode-server that referenced this issue Aug 18, 2022
@jrieken jrieken added the verified Verification succeeded label Aug 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2022
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 menus Menu items and widget issues verified Verification succeeded
Projects
None yet
9 participants