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

TypeError: Cannot read property 'onError' of undefined #58847

Closed
jtsom opened this issue Sep 18, 2018 · 13 comments
Closed

TypeError: Cannot read property 'onError' of undefined #58847

jtsom opened this issue Sep 18, 2018 · 13 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@jtsom
Copy link

jtsom commented Sep 18, 2018

Issue Type: Bug

When trying to start a C# application using the debugger, the above message is displayed in an alert and the below is generated in the debugging tools:

/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2354 TypeError: Cannot read property 'onError' of undefined
    at new t (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2579:87)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2977:238
    at Object.g [as _notify] (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:163:807)
    at Object.enter (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:167:85)
    at n.Class.derive._oncancel._run (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:168:932)
    at n.Class.derive._oncancel._completed (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:168:373)
    at e.resolveOk (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3197:752)
    at t._receiveReply (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3277:748)
    at t._receiveOneMessage (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3276:178)
    at file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:3273:553
    at e.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:184:218)
    at a (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320:237)
    at Socket.n._socketDataListener (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:320:456)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:594:20)

VS Code version: Code - Insiders 1.28.0-insider (7fcd81c, 2018-09-17T09:30:49.336Z)
OS version: Darwin x64 17.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (8 x 2900)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 3, 3
Memory (System) 16.00GB (0.17GB free)
Process Argv /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron -psn_0_716975
Screen Reader no
VM 0%
Extensions (12)
Extension Author (truncated) Version
json-to-ts Mar 1.5.5
ng-template Ang 0.1.10
path-intellisense chr 1.4.2
bracket-pair-colorizer Coe 1.0.60
githistory don 0.4.2
tslint eg2 1.0.39
auto-rename-tag for 0.0.15
Angular2 joh 6.1.5
csharp ms- 1.16.1
debugger-for-chrome msj 4.10.1
vscode-docker Pet 0.2.0
material-icon-theme PKi 3.6.0

(3 theme extensions excluded)

@vscodebot vscodebot bot added the insiders label Sep 18, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 18, 2018

@jtsom
Copy link
Author

jtsom commented Sep 18, 2018

Not a duplicate of any of those issues.

@YangHanlin
Copy link

It seems to be a bug of the current insiders build, which I also met when debugging C++ programs.
Another user of insider build have also had this problem (see #58854).
And it seems to have been noticed (see #58849).

@danyhoron
Copy link

I also encountered this issue trying to debug a C# netcoreapp2.0.

@jtsom
Copy link
Author

jtsom commented Sep 18, 2018

Unfortunately, in the latest insiders (d59d9f5) it's still broken.

@jtsom
Copy link
Author

jtsom commented Sep 18, 2018

I just ran a test on another machine. I was able to launch and debug a .net core app just fine. The one difference I noticed was in this system I have the LiveShare extension installed and loaded. As a test, I disabled the LiveShare extension and attempted to run the app. This time I received the TypeError error. I re-enabled LiveShare and was able to run the app again. I'm pretty sure I have LiveShare extension disabled on the other system where I noticed this.

A further test of completely uninstalling the LiveShare extension lets me run and debug my app just fine. Re-installing LiveShare returns to the above conditions (disabled == TypeError)

So it looks like even though LiveShare is disabled, something is causing a crash when attempting to run.

@2020emm
Copy link

2020emm commented Sep 18, 2018

I have the same problem, which began approximately 24 hours ago.
The problem breaks most, if not all, of my projects.
In addition: dotnet new console - broken, dotnet new webapi - broken, dotnet new mvc - broken
Successfully repaired SDK 2.1.402 - did not fix problem
Environment: VSCode Insiders, dotnet core sdk version 2.1.402, commit 3599f21f4, runtime environment windows server 2012, os 6.2.9200 (virtual machine), RID win 8-x64, base path c:\Program Fies\dotnet\sdk\2.1.402, host version 2.1.4, commit 85255dde3e, SDKs installed 2.1.4
runtimes installed: aspnetcore.all 2.1.4, aspnetcore.app 2.1.4, .netcore.app 2.1.4

I had the same problem with the red flame mentioned above about 1 week ago. I uninstalled omnisharp and also deleted references to it on the file system, then reinstalled it. That seemed to fix it.

@YangHanlin
Copy link

@jtsom I have checked and found no such extension.
But I found this problem in C++ development, so the same may not be true with yours.

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Sep 18, 2018
@weinand weinand added this to the September 2018 milestone Sep 18, 2018
@weinand
Copy link
Contributor

weinand commented Sep 18, 2018

I accidentally broke the legacy command based mechanism (adapterExecutableCommand) to get the debug adapter executable from the corresponding debugger extension.
The fix will be available in tomorrows Insiders.
Sorry for this.

Funny enough avoids an installed LiveShare extension the problem because it uses an alternative (and not broken) approach for the adapterExecutableCommand.

@antonio-petricca
Copy link

I encoured the same problem.

@weinand
Copy link
Contributor

weinand commented Sep 19, 2018

C++ and C# debugging works again in the latest Insiders.

@antonio-petricca
Copy link

It works for me too, thank you!

@YangHanlin
Copy link

It works for me as well. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

6 participants