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

Language service doesn't start at all, then partially, then finally fully #10056

Open
Peter-Juhasz opened this issue Mar 9, 2024 · 6 comments
Assignees

Comments

@Peter-Juhasz
Copy link

Peter-Juhasz commented Mar 9, 2024

VS 17.10.0 P1

Sometimes it is a gambling what language service capabilities are available when I open a file:

Nevtelen.video.mp4
  1. No language service works: no quick info, no completion, even syntax highlighting works only partially.
  2. Some services start: syntax highlighting, quick info, completion, reference highlighting, but still there is no outlining/structure.
  3. All works finally.

These are all the errors from logs:

9:26:20.504 [LSP][LanguageServer.Semantic.RazorSemanticTokensInfoService] Error thrown while retrieving CSharp semantic range.
StreamJsonRpc.RemoteInvocationException: Range={ Start={ Line=218, Character=58 }, End={ Line=219, Character=29 } }. text.Length=48480. text.Lines.Count=1457
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.RazorSemanticTokensInfoService.<GetMatchingCSharpResponseAsync>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.RazorSemanticTokensInfoService.<GetCSharpSemanticRangesAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.RazorSemanticTokensInfoService.<GetSemanticTokensAsync>d__9.MoveNext()
RPC server exception:
StreamJsonRpc.RemoteInvocationException: Range={ Start={ Line=218, Character=58 }, End={ Line=219, Character=29 } }. text.Length=48480. text.Lines.Count=1457
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__108`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.MefClient.<>c__DisplayClass32_0`2.<<SendRequestAsync>g__SendRequestAsyncHelperAsync|0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at System.Threading.Tasks.ValueTask`1.ValueTaskSourceAsTask.<>c.<.cctor>b__4_0(Object state)
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<<UndeferExecutionUpToFirstYieldAsync>g__UnwrapRemainingItemsAsync|2_0>d`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<<UndeferExecutionUpToFirstYieldAsync>g__UnwrapRemainingItemsAsync|2_0>d`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__3`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__46`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__46`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__9`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServerClient.Razor.RazorCustomMessageTarget.<ProvideSemanticTokensAsync>d__34.MoveNext()

9:26:20.510 [LSP][LanguageServer.RazorDocumentMappingService] Attempted to map a range (1410,26)-(1410,39) outside of the Source (line count 818.) This could happen if the Roslyn and Razor LSP servers are not in sync.
9:26:32.037 [LSP][LanguageServer.DocumentContextFactory] Tried to create context for document S:/X/Details - Copy.razor and project (null) which was not found.
9:26:32.037 [LSP][LanguageServer.RazorRequestContextFactory] Could not create a document context for textDocument/documentColor for file:///S:/X/Details - Copy.razor. Endpoint may crash later if it calls GetRequiredDocumentContext.
9:27:15.176 [LSP][LanguageServer.Semantic.RazorSemanticTokensInfoService] We are behind the C# version which is surprising. Could be an old request that wasn't cancelled, but if not, expect most future requests to fail. We were wanting 18 but C# is at 21.
9:27:16.958 [LSP][LanguageServer.Semantic.RazorSemanticTokensInfoService] We are behind the C# version which is surprising. Could be an old request that wasn't cancelled, but if not, expect most future requests to fail. We were wanting 23 but C# is at 25.
9:30:26.572 [LSP][LanguageServer.Semantic.RazorSemanticTokensInfoService] We are behind the C# version which is surprising. Could be an old request that wasn't cancelled, but if not, expect most future requests to fail. We were wanting 17 but C# is at 18.

It seems to be related to #9986 but although the symptoms are similar, this is another error. And the file I copied was a long time ago, although the error message talks about "Details.razor - Copy.razor" which doesn't even exist.

Related to #10021 as well, but different, because in that case there were no logs at all, it was another combination of services stopped, and in that case there was no copying at all involved.

@Peter-Juhasz
Copy link
Author

May be related (document opens with some colors, but basically nothing works):

10:59:50.449 [LSP][LanguageServer.Semantic.RazorSemanticTokensInfoService] Error thrown while retrieving CSharp semantic range.
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for roslyn/semanticTokenRanges
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.RazorSemanticTokensInfoService.<GetMatchingCSharpResponseAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.RazorSemanticTokensInfoService.<GetCSharpSemanticRangesAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.Semantic.RazorSemanticTokensInfoService.<GetSemanticTokensAsync>d__8.MoveNext()
RPC server exception:
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for roslyn/semanticTokenRanges
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__112`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__9`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServerClient.Razor.RazorCustomMessageTarget.<ProvideSemanticTokensAsync>d__36.MoveNext()

@Peter-Juhasz
Copy link
Author

VS 17.10.0 P2

After only half an hour of work it is so broken again that no document can be opened for editing with fully working language services:

Rogzites.2024-03-23.111152.mp4

Some more errors:

11:02:45.036 [CLaSP] [null]
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for textDocument/inlayHint
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.InlayHints.InlayHintService.<GetInlayHintsAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.<StartRequestAsync>d__20.MoveNext()
RPC server exception:
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for textDocument/inlayHint
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__112`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__9`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServerClient.Razor.RazorCustomMessageTarget.<ProvideInlayHintsAsync>d__23.MoveNext()
11:02:59.565 [LSP][LanguageServer.Hover.HoverEndpoint] Error calling delegate server for razor/hover
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for textDocument/hover
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.AbstractRazorDelegatingEndpoint`2.<HandleRequestAsync>d__25.MoveNext()
RPC server exception:
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for textDocument/hover
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__112`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__9`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServerClient.Razor.RazorCustomMessageTarget.<DelegateTextDocumentPositionAndProjectContextAsync>d__48`1.MoveNext()
11:02:59.567 [CLaSP] [null]
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for textDocument/hover
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Razor.LanguageServer.AbstractRazorDelegatingEndpoint`2.<HandleRequestAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.<StartRequestAsync>d__20.MoveNext()
RPC server exception:
StreamJsonRpc.RemoteInvocationException: Value cannot be null.
Parameter name: Document is null when it was required for textDocument/hover
      at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__154`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__112`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__50`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__45.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__9`2.MoveNext()
   --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
      at Microsoft.VisualStudio.LanguageServerClient.Razor.RazorCustomMessageTarget.<DelegateTextDocumentPositionAndProjectContextAsync>d__48`1.MoveNext()

@davidwengier
Copy link
Member

@Peter-Juhasz could you do us a favour and log this issue through VS Feedback, and include a recording of the issue? That will capture a memory dump and ETL traces that hopefully will help us diagnose what is going on. If you set the LogLevel environment to All before running Visual Studio, that would be even better!

I'm hoping this is another instance of #10007 which is fixed in the next preview.

@Peter-Juhasz
Copy link
Author

Unfortunately, I'm not allowed to create a memory dump, but if you work with a medium size project day to day, it should come up quite often.

But here is another error, which I have not seen yet:

9:05:41.945 [LSP][LanguageServer.DocumentContextFactory] Tried to create context for document S:/REDACTED.razor and project S:/REDACTED/obj/Debug/net8.0/ which was not found.
9:05:41.945 [LSP][LanguageServer.RazorRequestContextFactory] Could not create a document context for textdocument/_vs_diagnostic for file:///S:/git/REDACTED.razor. Endpoint may crash later if it calls GetRequiredDocumentContext.
9:05:41.945 [CLaSP] [null]
System.ArgumentNullException: Could not find a document context for 'textdocument/_vs_diagnostic' on 'file:///S:/REDACTED.razor'
Parameter name: DocumentContext
   at Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts.RazorRequestContext.GetRequiredDocumentContext()
   at Microsoft.AspNetCore.Razor.LanguageServer.Diagnostics.DocumentPullDiagnosticsEndpoint.<HandleRequestAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.<StartRequestAsync>d__20.MoveNext()

The symptom is that some types are not recognized (in C# ranges), and none of the Razor components. After some time, types got recognized, but still, none of the components.

@M0n7y5
Copy link

M0n7y5 commented Oct 30, 2024

I have the same issue. I am working on a app that is using MAUI Blazor Hybrid. I noticed that lately the editor wont allow me to fold the razor code for some reason. Upon further digging for answers i discovered almost the same logs as @Peter-Juhasz posted has, in the Razor Logger Output.

@Xian55
Copy link

Xian55 commented Feb 14, 2025

Gooday!

I was just about fill the issue when i noticed a new version is available of Visual Studio 17.12.5.
After updating it, the issue seems to be resolved.
On the other hand i've deleted the .vs folder in my project root directory!

I can no longer see in the output window dropdown menu the Razor Logger Output.


I'm experiencing similar trouble while i trying to edit my razor files, as it was reported by others it was a gamble.

Nonetheless in case somebody encounters the issue, here's what my experience was

My setup

Result:

  • Essentially losing all intellisense and text highlight capabilities.
  • Code navigation inside the file does not work, making the IDE no better then a notepad.exe.

Repro case:

  • Open Visual Studio
  • hit: CTRL+1+T to open search
  • clear the t: filter
  • type closenpc.razor
  • hit enter

In the output window filtering for Razor Logger Output seeing the following log messages

[Razor.LanguageClient.Endpoints.RazorCustomMessageTarget] 
[01:37:24.2295704] Error getting semantic tokens from Roslyn for host version 6, correlation ID aeadb237-4c6c-4644-b86a-5974ab9c2716
[LSP][LanguageServer.Hover.HoverEndpoint] [01:28:30.6828538] Error calling delegate server for razor/hover
 StreamJsonRpc.RemoteInvocationException: Value cannot be null.
 Parameter name: Document is null when it was required for textDocument/hover
 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.AspNetCore.Razor.LanguageServer.AbstractRazorDelegatingEndpoint`2.<HandleRequestAsync>d__25.MoveNext()
 RPC server exception:
 StreamJsonRpc.RemoteInvocationException: Value cannot be null.
 Parameter name: Document is null when it was required for textDocument/hover
 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__122`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__49`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__49`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAllAsync>d__55`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAllAsync>d__55`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__54`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__54`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__6`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Razor.LanguageClient.Endpoints.RazorCustomMessageTarget.<DelegateTextDocumentPositionAndProjectContextAsync>d__62`1.MoveNext()
[CLaSP] [01:28:30.6848523] [null]:
  StreamJsonRpc.RemoteInvocationException: Value cannot be null.
 Parameter name: Document is null when it was required for textDocument/hover
 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.AspNetCore.Razor.LanguageServer.AbstractRazorDelegatingEndpoint`2.<HandleRequestAsync>d__25.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`1.<StartRequestAsync>d__16`2.MoveNext()
 RPC server exception:
 StreamJsonRpc.RemoteInvocationException: Value cannot be null.
 Parameter name: Document is null when it was required for textDocument/hover
 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__122`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__49`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__49`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAllAsync>d__55`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAllAsync>d__55`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__54`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAsync>d__54`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnServerAsync>d__6`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.Razor.LanguageClient.Endpoints.RazorCustomMessageTarget.<DelegateTextDocumentPositionAndProjectContextAsync>d__62`1.MoveNext()
[LSP][LanguageServer.CodeActions.CodeActionEndpoint] [01:28:31.6546054] Error getting code actions from delegate language server for CSharp
 StreamJsonRpc.RemoteInvocationException: Value cannot be null.
 Parameter name: TextDocument is null when it was required for textDocument/codeAction
 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.AspNetCore.Razor.LanguageServer.ClientConnection.<SendRequestAsync>d__3`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.AspNetCore.Razor.LanguageServer.CodeActions.CodeActionEndpoint.<GetCodeActionsFromLanguageServerAsync>d__21.MoveNext()
 RPC server exception:
 StreamJsonRpc.RemoteInvocationException: Value cannot be null.
 Parameter name: TextDocument is null when it was required for textDocument/codeAction
 at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__156`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.<SendMethodRequestWithTelemetryAsync>d__0`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.<TrackTaskAsync>d__122`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<>c__DisplayClass3_0`2.<<SendRequestAsync>g__SendRequestAsync|0>d.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstanceExtensions.<<SendRequestAsync>g__UnwrapAsync|3_3>d`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClient.EnqueuedMessage`2.<GetResponsesAsync>d__8.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<MoveNextWrappedAsync>d__2`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.AsyncEnumerableExtensions.<SelectManyAsync>d__1`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__49`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.LanguageServiceClientManager.<RequestFromSpecificClientsAsync>d__49`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAllAsync>d__55`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.<RequestAllAsync>d__55`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnMultipleServersAsync>d__10`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.LanguageServer.ContainedLanguage.DefaultLSPRequestInvoker.<ReinvokeRequestOnMultipleServersAsync>d__10`2.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(Int16 token)
 at Microsoft.VisualStudio.Razor.LanguageClient.Endpoints.RazorCustomMessageTarget.<ProvideCodeActionsAsync>d__21.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
 at Microsoft.VisualStudio.Razor.LanguageClient.Endpoints.RazorCustomMessageTarget.<ProvideCodeActionsAsync>d__21.MoveNext()

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

No branches or pull requests

6 participants