Closed Anurella closed 5 months ago
System.AggregateException: Project system data flow 'Workspace update handler 19481099' closed because of an exception: The JSON-RPC connection with the remote party was lost before the request could complete.. (The JSON-RPC connection with the remote party was lost before the request could complete.)
---> (Inner Exception #0) StreamJsonRpc.RemoteInvocationException: The JSON-RPC connection with the remote party was lost before the request could complete.
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Handlers.DynamicItemHandler.<>c__DisplayClass6_0.<g__ProcessAdditions|4>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Handlers.DynamicItemHandler.HandleProjectChangeAsync(IWorkspaceProject context, IComparable version, IProjectChangeDescription projectChange, ContextState state, ITelemetryOperation telemetryOperation, IManagedProjectDiagnosticOutputService logger)
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Handlers.DynamicItemHandler.HandleAsync(IWorkspaceProject context, IComparable version, IImmutableDictionary`2 projectChanges, ContextState state, ITelemetryOperation telemetryOperation, IManagedProjectDiagnosticOutputService logger)
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass43_1.<g__ProcessSourceItemsHandlersAsync|6>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass43_0.<g__ApplyProjectEvaluationAsync|2>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.VisualStudio.ProjectSystem.VSCode.LanguageServices.Workspace.<>c__DisplayClass46_1`1.<g__ApplyInBatchAsync|1>d.MoveNext()
--- End of stack trace from previous location
@tmeschter is devkit calling out to C# here - or is this an error talking to a different service?
Looks like devkit is losing the connection to the C# extension.
@Anurella would you mind changing the dotnet.server.trace
configuration to Trace
and posting the logs from the C# output window as well when you hit this issue?
Looks like devkit is losing the connection to the C# extension.
@Anurella would you mind changing the
dotnet.server.trace
configuration toTrace
and posting the logs from the C# output window as well when you hit this issue?
@dibarbet may I ask what the steps are to make the change? I would also look out for it once the change has been made.
@Anurella modify the value in vscode settings, then reload the window (cntrl+shift+p, type 'reload window')
Then share the contents of the C# output window. Thanks!
@dibarbet please see below content, tried to take the earlier bits as the output was a lot to paste on here
Thanks - based on those logs it doesn't appear as though anything is explicitly going wrong in the C# extension, it looks like it is still running.
A couple more things to confirm
Get-WmiObject Win32_Process -Filter "name = 'dotnet.exe'" | Select-Object Name,ProcessId,CommandLine | Select-String 'Microsoft.CodeAnalysis.LanguageServer'
Will output something like this if it exists:
@Anurella apologies for the delay, taking a look at the extension logs now, a bunch of logs appear to be missing. I'm not seeing any of the output window logging which is super important. Best way to get these
Thanks!
Thank you @dibarbet. I have sent the email
Thank you @dibarbet. I have sent the email
Got it- thanks! Will take a look this week.
Aha - this log has the correct details - thanks!
The error:
[Error - 8:36:53 AM] [LanguageServerHost] System.InvalidOperationException: didOpen received for virtualcsharp-razor:///<file path>.cshtml__virtual.cs which is already open. - line 106
at Roslyn.Utilities.Contract.Fail(String message, Int32 lineNumber) in /_/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Utilities/Contract.cs:line 154
at Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceManager.StartTrackingAsync(Uri uri, SourceText documentText, String languageId, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Workspaces/LspWorkspaceManager.cs:line 106
at Microsoft.CodeAnalysis.LanguageServer.Handler.DocumentChanges.DidOpenHandler.HandleNotificationAsync(DidOpenTextDocumentParams request, RequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Handler/DocumentChanges/DidOpenHandler.cs:line 42
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 136
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken)
at Microsoft.CommonLanguageServerProtocol.Framework.RequestExecutionQueue`1.ProcessQueueAsync() in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/RequestExecutionQueue.cs:line 239
This is potentially the same as https://github.com/dotnet/vscode-csharp/issues/6644, which will hopefully be fixed in this weeks release. However its hard to tell without the solution file.
@ryzngard would you mind taking a look here since this looks like an issue on the Razor side? I am seeing two entries for the same file in the Razor log:
Trying to create DocumentContext for textDocument/didClose for (no project context) for file:///<path>/SliderSection.cshtml
...
Trying to create DocumentContext for textDocument/didClose for (no project context) for file:///<path>/SliderSection.cshtml
Agree this looks the same. @Anurella can you confirm if there is a possible difference in casing somewhere in your csproj files and on disk naming?
@ryzngard there is no difference in the naming, only one file exists.
Or can you help clarify what you would need me to check specifically. Thank you
@Anurella is there a solution you can share? Either or on GitHub or private e-mailing me ? That would be the easiest way for me to verify
@Anurella , if you have a solution that repros this issue, can you share it with us so that we can diagnose the particular cause of the issue?
To be honest I am not sure I have. I sent the log files to @ryzngard when I encountered it.
Not worked on the file in a minute so I have not had to encounter the issue. But I think it might be a case of the razor formatter and prettier being active at the same time.
Let me double check my email, I have a few logs sent to me and for some reason thought this issue I didn't get them.
I apologize @Anurella but I can't seem to find the e-mail. Do you mind resending? I checked spam just in case as well but no luck.
I am sorry it was @dibarbet I sent it to initially, but I have sent it to you now. Do let me know if you get it.
@Anurella I don't see the initial error in the logs you sent, but I do see a lot of exceptions around SemanticTokensRange being incorrect on request. This looks like it might be similar to https://github.com/dotnet/razor/issues/9598 (and others that we haven't correlated yet, but I'm sure we have). Can you confirm you're seeing those exceptions normally?
The original exception I was looking for, Project system data flow 'Workspace update handler...
was not contained in the logs
Closing as not enough info, if you're still hitting issues on the latest extensions, please re-open with the information requested above.
Thank you and noted @dibarbet
Issue Description
Everytime i open my vscode, this notification pops up Project system ran into an unexpected problem, please report it to the product team do not understand the message but i have placed log details in the log section.
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.83.1 C# Extension: 2.7.25 Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 7.0.306 Commit: f500069cb7 Runtime Environment: OS Name: Windows OS Version: 10.0.19044 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.306\ Host: Version: 7.0.9 Architecture: x64 Commit: 8e9a17b221 .NET SDKs installed: 7.0.306 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 7.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Other architectures found: None Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/downloadVisual Studio Code Extensions
|Extension|Author|Version|Folder Name| |---|---|---|---| |csdevkit|ms-dotnettools|0.5.150|ms-dotnettools.csdevkit-0.5.150-win32-x64| |csharp|ms-dotnettools|2.7.25|ms-dotnettools.csharp-2.7.25-win32-x64| |open-in-browser|techer|2.0.0|techer.open-in-browser-2.0.0| |vscodeintellicode-csharp|ms-dotnettools|0.1.26|ms-dotnettools.vscodeintellicode-csharp-0.1.26-win32-x64|;