Skip to content

NullReferenceException from PSES if no folder is open when Preview Extension Loaded #2311

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

Closed
JustinGrote opened this issue Nov 18, 2019 · 1 comment · Fixed by PowerShell/PowerShellEditorServices#1107
Labels

Comments

@JustinGrote
Copy link
Collaborator

JustinGrote commented Nov 18, 2019

System Details

Using VSIX from #2304

System Details Output

11/18/2019 12:58:30 PM [ERROR] - Error: Internal Error - System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.PowerShell.EditorServices.Server.PsesLanguageServer.<>c.<<StartAsync>b__18_3>d.MoveNext() in D:\a\1\PowerShellEditorServices\src\PowerShellEditorServices\Server\PsesLanguageServer.cs:line 114
--- End of stack trace from previous location where exception was thrown ---
   at OmniSharp.Extensions.LanguageServer.Server.LanguageServer.MediatR.IRequestHandler<OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeParams,OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeResult>.Handle(InitializeParams request, CancellationToken token)
   at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPostProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at MediatR.Pipeline.RequestPreProcessorBehavior`2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate`1 next)
   at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)

Expected Behaviour

Extension should load on a new window with no folder specified

Actual Behaviour

"Could not start language service"

Attached Logs

Follow the instructions in the troubleshooting docs
about capturing and sending logs.

@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 18, 2019
@JustinGrote JustinGrote changed the title NullPointerException from PSES if no folder is open when Preview Extension Loaded NullReferenceException from PSES if no folder is open when Preview Extension Loaded Nov 18, 2019
@TylerLeonhardt
Copy link
Member

Fix out for this - thanks for catching that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants