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

[debug][electron] Multiple debug model related errors when starting the electron example application #3408

Closed
kittaakos opened this issue Nov 6, 2018 · 6 comments
Labels
bug bugs found in the application debug issues that related to debug functionality electron issues related to the electron target

Comments

@kittaakos
Copy link
Contributor

git branch -vv && yarn --cwd ./examples/electron/ start
* master 1efad7cb [origin/master] Add process dependency to file-search
yarn run v1.10.1
$ theia start
/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:4058 Uncaught (in promise) TypeError: this.model.breakpoints.values is not a function
    at DebugBreakpointsSource.push.../../packages/debug/lib/browser/view/debug-breakpoints-source.js.DebugBreakpointsSource.getElements (/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:4058)
    at SourceTree.push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveElements (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:390)
    at SourceTree.<anonymous> (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:363)
    at step (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:334)
    at Object.next (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:315)
    at /Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:309
    at Promise (<anonymous>)
    at push.../../packages/core/lib/browser/source-tree/source-tree.js.__awaiter (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:305)
    at SourceTree.push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveChildren (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:359)
    at SourceTree.<anonymous> (bundle.js:88588)
/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5500 Uncaught (in promise) TypeError: scopes.values is not a function
    at DebugVariablesSource.<anonymous> (/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5500)
    at step (/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5459)
    at Object.next (/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5440)
    at /Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5434
    at Promise (<anonymous>)
    at push.../../packages/debug/lib/browser/view/debug-variables-source.js.__awaiter (/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5430)
    at DebugVariablesSource.push.../../packages/debug/lib/browser/view/debug-variables-source.js.DebugVariablesSource.getElements (/Users/akos.kitta/git/theia/examples/electron/lib/57.bundle.js:5484)
    at SourceTree.push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveElements (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:390)
    at SourceTree.<anonymous> (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:363)
    at step (/Users/akos.kitta/git/theia/examples/electron/lib/28.bundle.js:334)
bundle.js:91178 task INFO Config file tasks.json does not exist under file:///Users/akos.kitta/Desktop/mini-browser
``
@kittaakos kittaakos added the debug issues that related to debug functionality label Nov 6, 2018
@kittaakos kittaakos added the bug bugs found in the application label Nov 15, 2018
@kittaakos
Copy link
Contributor Author

@akosyakov, any ideas what could cause this issue in Electron but not in the browser example? The error happens each time I open anything in a Code Editor.

@kittaakos
Copy link
Contributor Author

This is what I see now:

debug-hover-source.tsx:36 Uncaught (in promise) TypeError: this.elements.values is not a function
    at DebugHoverSource.push.../../packages/debug/lib/browser/editor/debug-hover-source.js.DebugHoverSource.getElements (debug-hover-source.tsx:36)
    at SourceTree.push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveElements (source-tree.ts:39)
    at SourceTree.<anonymous> (source-tree.ts:26)
    at step (source-tree.ts:15)
    at Object.next (source-tree.ts:15)
    at source-tree.ts:15
    at Promise (<anonymous>)
    at push.../../packages/core/lib/browser/source-tree/source-tree.js.__awaiter (source-tree.ts:15)
    at SourceTree.push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveChildren (source-tree.ts:25)
    at SourceTree.<anonymous> (tree.ts:262)
push.../../packages/debug/lib/browser/editor/debug-hover-source.js.DebugHoverSource.getElements @ debug-hover-source.tsx:36
push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveElements @ source-tree.ts:39
(anonymous) @ source-tree.ts:26
step @ source-tree.ts:15
(anonymous) @ source-tree.ts:15
(anonymous) @ source-tree.ts:15
push.../../packages/core/lib/browser/source-tree/source-tree.js.__awaiter @ source-tree.ts:15
push.../../packages/core/lib/browser/source-tree/source-tree.js.SourceTree.resolveChildren @ source-tree.ts:25
(anonymous) @ tree.ts:262
step @ tree.ts:15
(anonymous) @ tree.ts:15
(anonymous) @ tree.ts:15
../../packages/core/lib/browser/tree/tree.js.__awaiter @ tree.ts:15
../../packages/core/lib/browser/tree/tree.js.TreeImpl.refresh @ tree.ts:259
set @ tree.ts:230
set @ tree-model.ts:181
set @ source-tree-widget.tsx:62
push.../../packages/debug/lib/browser/editor/debug-hover-widget.js.DebugHoverWidget.init @ debug-hover-widget.ts:96
_postConstruct @ instantiation.js:27
resolveInstance @ instantiation.js:47
(anonymous) @ resolver.js:72
_injectProperties @ instantiation.js:11
resolveInstance @ instantiation.js:42
(anonymous) @ resolver.js:72
resolve @ resolver.js:96
(anonymous) @ container.js:319
../../node_modules/inversify/lib/container/container.js.Container._get @ container.js:310
../../node_modules/inversify/lib/container/container.js.Container.get @ container.js:230
push.../../packages/debug/lib/browser/editor/debug-editor-model.js.DebugEditorModel.createModel @ debug-editor-model.ts:41
(anonymous) @ debug-frontend-module.ts:45
push.../../packages/debug/lib/browser/editor/debug-editor-service.js.DebugEditorService.push @ debug-editor-service.ts:64
(anonymous) @ debug-editor-service.ts:50
../../packages/core/lib/common/event.js.CallbackList.invoke @ event.ts:107
../../packages/core/lib/common/event.js.Emitter.fire @ event.ts:199
(anonymous) @ widget-open-handler.ts:60
../../packages/core/lib/common/event.js.CallbackList.invoke @ event.ts:107
../../packages/core/lib/common/event.js.Emitter.fire @ event.ts:199
(anonymous) @ widget-manager.ts:140
step @ widget-manager.ts:15
(anonymous) @ widget-manager.ts:15
fulfilled @ widget-manager.ts:15

@akosyakov akosyakov self-assigned this Nov 20, 2018
@akosyakov akosyakov added the electron issues related to the electron target label Nov 30, 2018
@akosyakov
Copy link
Member

An error from the backend:

root ERROR TypeScript: /Users/kosyakov/git/theia/node_modules/vscode-languageserver/lib/main.js:405
    showErrorMessage(message, ...actions) {
                              ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/kosyakov/git/theia/node_modules/typescript-language-server/lib/lsp-connection.js:9:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

root INFO [nsfw-watcher: 52495] Started watching: /Users/kosyakov/git/theia/packages/core/src/common/uri.spec.ts
/Users/kosyakov/git/theia/packages/debug-nodejs/download/node-debug2/extension/node_modules/vscode-debugadapter/lib/debugSession.js:12
    constructor(name, path, id = 0, origin, data) {
                               ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/kosyakov/git/theia/packages/debug-nodejs/download/node-debug2/extension/node_modules/vscode-debugadapter/lib/main.js:7:24)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
root ERROR The ws channel does not exist 20
root ERROR The ws channel does not exist 20
2018-11-30 10:31:07.501 Electron[52007:19894157] *** WARNING: Textured window <EventDispatchingWindow: 0x7fed69cd4740> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
2018-11-30 10:31:07.933 Electron Helper[52533:19895635] Couldn't set selectedTextBackgroundColor from default ()
^C

It seesm that we spawn a Node.js process with the Node.js debug adapter with Node.js version which does not support the array spread operator.

@akosyakov
Copy link
Member

akosyakov commented Nov 30, 2018

It is somehow related to yarn, if I run without yarn, i.e. with ../../node_modules/.bin/electron ./src-gen/frontend/electron-main.js then it works fine

@akosyakov
Copy link
Member

The same issue like here: #3679 (comment)

@colin-grant-work
Copy link
Contributor

I can no longer reproduce this bug, so I'm going to close this issue for now. Please comment / reopen if you encounter this issue in the current version of Theia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application debug issues that related to debug functionality electron issues related to the electron target
Projects
None yet
Development

No branches or pull requests

3 participants