JavaScript does not work; the kernel or host throws a null reference exception
See original GitHub issueDescribe the bug
I installed the extension in Visual Studio Code Insiders and I am not able to run a JavaScript interactive cell. Cell test contents:
console.log('test')
Exception copied below.
Please complete the following:
Which version of .NET Interactive are you using? Version: 1.0.132609+29c04d2c9fbbf3b6975d8e76d2abd62097db285b Build date: 2020-06-27T12:53:18.3665518Z
- OS
- Windows 10
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- Chrome
- Edge
- Firefox
- Safari
- Frontend
- Jupyter Notebook
- Jupyter Lab
- nteract
- Visual Studio Code
- Other (please specify)
Exception
Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.DotNet.Interactive.App.CommandLine.CommandLineParser.<>c__DisplayClass7_0.<SetUpFormatters>b__2(ScriptContent script, TextWriter writer) in F:\workspace\_work\1\s\src\dotnet-interactive\CommandLine\CommandLineParser.cs:line 529
at Microsoft.DotNet.Interactive.Formatting.AnonymousTypeFormatter`1.Format(T instance, TextWriter writer) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\AnonymousTypeFormatter{T}.cs:line 27
at Microsoft.DotNet.Interactive.Formatting.TypeFormatter`1.Microsoft.DotNet.Interactive.Formatting.ITypeFormatter.Format(Object instance, TextWriter writer) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\TypeFormatter{T}.cs:line 19
at Microsoft.DotNet.Interactive.Formatting.Formatter`1.FormatTo(T obj, TextWriter writer, String mimeType) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\Formatter{T}.cs:line 93
at Microsoft.DotNet.Interactive.Formatting.Formatter.FormatTo[T](T obj, TextWriter writer, String mimeType) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\Formatter.cs:line 278
at Microsoft.DotNet.Interactive.Formatting.Formatter.ToDisplayString(Object obj, String mimeType) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\Formatter.cs:line 242
at Microsoft.DotNet.Interactive.KernelInvocationContextExtensions.Display(KernelInvocationContext context, Object value, String mimeType) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelInvocationContextExtensions.cs:line 33
at Microsoft.DotNet.Interactive.KernelInvocationContextExtensions.DisplayAsync(KernelInvocationContext context, Object value, String mimeType) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelInvocationContextExtensions.cs:line 20
at Microsoft.DotNet.Interactive.JavaScriptKernel.HandleAsync(SubmitCode command, KernelInvocationContext context) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\JavaScriptKernel.cs:line 24
at Microsoft.DotNet.Interactive.Commands.KernelCommand.InvokeAsync(KernelInvocationContext context) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\Commands\KernelCommand.cs:line 48
at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 293
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<BuildPipeline>b__6_0(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation _) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 56
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 74
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.CompositeKernel.LoadExtensions(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation next) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 119
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 74
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.Kernel.<AddDirectiveMiddlewareAndCommonCommandHandlers>b__21_0(KernelCommand originalCommand, KernelInvocationContext context, KernelPipelineContinuation next) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 125
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 74
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.Kernel.SetKernel(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation next) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 221
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 74
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.Kernel.<>c.<<AddCaptureConsoleMiddleware>b__20_0>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 100
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 75
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.SendAsync(KernelCommand command, KernelInvocationContext context) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 48
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
javascript - Null Reference Exception is thrown sometimes
Null Reference Exception is thrown sometimes ... Based on screen resolution iam setting a login web page. How do I avoid null reference...
Read more >Why are null references shunned while throwing ...
A Null reference usually occurs because something in the program logic was missed, ie: you got to a line of code without going...
Read more >Null Reference Exceptions
NullReferenceException happens when your script code tries to use a variable which isn't set (referencing) and object. The error message that appears tells...
Read more >Deployment Error Configuration Failed | Apigee Edge
Deployment of API proxy or Shared Flow revisions through the Edge UI or management API fails with a Configuration failed error.
Read more >Troubleshoot Cloud Run issues
This page shows you how to resolve issues with Cloud Run. For other issues not listed below, check to see if they may...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also note that you can put both of these into a single cell so that the JavaScript output appears in a more intuitive location:
A small example to work with: