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

[electron] Unhandled method validateKeyCode error in a bundled electron application #5093

Closed
kittaakos opened this issue May 8, 2019 · 2 comments · Fixed by #5094
Closed
Assignees
Labels
electron issues related to the electron target keybindings issues related to keybindings

Comments

@kittaakos
Copy link
Contributor

messages.js:46 Uncaught (in promise) Error: Unhandled method validateKeyCode
    at Proxy.<anonymous> (proxy-factory.ts:232)
    at KeyboardLayoutService../node_modules/@theia/core/lib/browser/keyboard/keyboard-layout-service.js.KeyboardLayoutService.validateKeyCode (keyboard-layout-service.ts:112)
    at KeybindingRegistry../node_modules/@theia/core/lib/browser/keybinding.js.KeybindingRegistry.run (keybinding.ts:614)
    at HTMLDocument.<anonymous> (frontend-application.ts:171)
ResponseError @ messages.js:46
handleResponse @ main.js:430
processMessageQueue @ main.js:258
(anonymous) @ main.js:242
runCallback @ timers.js:694
tryOnImmediate @ timers.js:665
processImmediate @ timers.js:647

I cannot share the effective package.json as is, once I managed to strip down the context, I'll update this PR with a reproducible configuration.

A few things before I start investigating the problem:

  • I think we should not store the JSON files in the src folder: @theia/core/src/common/keyboard/layouts. For instance, for the TextMate grammars we use data, cannot we do the same?
  • [minor]: As a convention, we use electron-node and not electron-main for the electron specific Theia backend bindings: @theia/core/src/electron-main/keyboard. See the Git Theia extension.
@kittaakos kittaakos added electron issues related to the electron target keybindings issues related to keybindings labels May 8, 2019
@spoenemann spoenemann self-assigned this May 8, 2019
@spoenemann
Copy link
Contributor

The problem is reproducible in @theia/example-electron.

@spoenemann
Copy link
Contributor

I need to wait until #5088 is merged to avoid merge conflicts.

spoenemann added a commit that referenced this issue May 8, 2019
Extracted KeyValidator interface to be able to detect whether that service is supported.

Signed-off-by: Miro Spönemann <miro.spoenemann@typefox.io>
spoenemann added a commit that referenced this issue May 8, 2019
Extracted KeyValidator interface to be able to detect whether that service is supported.

Signed-off-by: Miro Spönemann <miro.spoenemann@typefox.io>
fangnx pushed a commit to fangnx/theia that referenced this issue May 8, 2019
Extracted KeyValidator interface to be able to detect whether that service is supported.

Signed-off-by: Miro Spönemann <miro.spoenemann@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target keybindings issues related to keybindings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants