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

Unclear warning when menu group does not exist #1350

Open
Sebastian-ubs opened this issue Nov 26, 2024 · 0 comments
Open

Unclear warning when menu group does not exist #1350

Sebastian-ubs opened this issue Nov 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Sebastian-ubs
Copy link
Contributor

Sebastian-ubs commented Nov 26, 2024

Describe the bug
When referencing a non-existing group (maybe because of a typo) the error message is unfortunately not giving enough hints.

"defaultWebViewTopMenu": {
    "items": [
      {
        ...
        "group": "extensionName-typo-in-here",
      }
    ]
}

leads to

[start:core] [1] 10:07:35 [extension host warning] 10:07:35.186 > Could not add menu contribution for website-viewer: TypeError: Cannot read properties of undefined (reading 'isExtensible') [at C:\code\paranext-core\src\extension-host\services\extension.service.ts:1131:18]
(website-viewer ist the extension name, not the column, group or menu entry name this is referring to)

To Reproduce
Steps to reproduce the behavior:

  1. Implement this code in an extension
  2. Watch the console output

Expected behavior
The warning should be "Could not add menu contribution for ...: A group with reference typo-in-here does not exist"

@Sebastian-ubs Sebastian-ubs added the bug Something isn't working label Nov 26, 2024
@Sebastian-ubs Sebastian-ubs changed the title Unexpected warning when extending web view menus Unclear warning when menu group does not exist Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant