-
Notifications
You must be signed in to change notification settings - Fork 673
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
Omnisharp dies when connecting to LiveShare session #3910
Comments
cc @NTaylorMullen looks like the stack trace is from the razor language server |
Hmm @baronmog are you saying that you get no C# experience even in C# files? Or is it just the Razor experience that dies? |
@NTaylorMullen Razor and C# alike for me.Razor.VSCode version 6.0.0-alpha.1.20418.9Razor's trace level is currently set to 'Off'
[Error - 10:15:17 AM] Server initialization failed. |
@n3rd253 if you set "razor.disabled" to |
@NTaylorMullen I suppose particularly my issue is not intellisense itself. Intellisense is working, but there is no referential integrity. I cannot click and navigate through references and implementations of things, as it seems there are no such symbols available to traverse. |
Ah, so even without Razor involved ( |
@NTaylorMullen this is correct, razor or not I am having issues traversing C# whilst in vscode. |
In LiveShare scenarios we shouldn't try to start OmniSharp at all because it won't have access to the files. All language server responsibilities (limited to those that LiveShare knows about) are handled on the "server". |
Environment data
.NET Core SDK (reflecting any global.json):
Version: 3.1.301
Commit: 7feb845744
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.301/
Host (useful for support):
Version: 3.1.5
Commit: 65cd789777
.NET Core SDKs installed:
3.1.101 [/usr/local/share/dotnet/sdk]
3.1.200 [/usr/local/share/dotnet/sdk]
3.1.301 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.17 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
VS Code version: 1.47.0
C# Extension version: 1.22.1
OmniSharp log
[Client - 12:35:24 PM] Razor language server path: /Users/nromer/.vscode/extensions/ms-dotnettools.csharp-1.22.1/.razor/rzls
[Client - 12:35:33 PM] Starting Razor Language Server...
[Client - 12:35:33 PM] Server started, waiting for client to be ready...
[Info - 12:35:33 PM] Finding descriptor for initialize
[Info - 12:35:33 PM] Starting: Routing Request (0) initialize
[Info - 12:35:33 PM] Converting params for Request (0) initialize to OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeParams
[Error - 12:35:33 PM] Failed to handle notification initialize - System.ArgumentNullException: Value cannot be null. (Parameter 'workspaceDirectory')
at Microsoft.AspNetCore.Razor.LanguageServer.ProjectConfigurationFileChangeDetector.StartAsync(String workspaceDirectory, CancellationToken cancellationToken) in //src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectConfigurationFileChangeDetector.cs:line 50
at Microsoft.AspNetCore.Razor.LanguageServer.RazorFileChangeDetectorManager.InitializedAsync(ILanguageServer languageServer) in //src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorFileChangeDetectorManager.cs:line 42
at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageServer.<>c__DisplayClass1_0.<b__3>d.MoveNext() in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageServer.cs:line 53
--- End of stack trace from previous location ---
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) [Info - 12:35:33 PM] Finished: Routing Request (0) initialize in 63ms [Error - 12:35:33 PM] Server initialization failed. Message: Internal Error - System.ArgumentNullException: Value cannot be null. (Parameter 'workspaceDirectory') at Microsoft.AspNetCore.Razor.LanguageServer.ProjectConfigurationFileChangeDetector.StartAsync(String workspaceDirectory, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/ProjectConfigurationFileChangeDetector.cs:line 50 at Microsoft.AspNetCore.Razor.LanguageServer.RazorFileChangeDetectorManager.InitializedAsync(ILanguageServer languageServer) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorFileChangeDetectorManager.cs:line 42 at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageServer.<>c__DisplayClass1_0.<<CreateAsync>b__3>d.MoveNext() in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageServer.cs:line 53 --- End of stack trace from previous location --- 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, RequestHandlerDelegate1 next) at MediatR.Pipeline.RequestPostProcessorBehavior
2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate1 next) at MediatR.Pipeline.RequestPreProcessorBehavior
2.Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate1 next) at OmniSharp.Extensions.JsonRpc.RequestRouterBase
1.RouteRequest(TDescriptor descriptor, Request request, CancellationToken token)Code: -32602
[Info - 12:35:33 PM] Finding descriptor for shutdown
[Info - 12:35:33 PM] Starting: Routing Request (1) shutdown
[Info - 12:35:33 PM] Converting params for Request (1) shutdown to OmniSharp.Extensions.JsonRpc.EmptyRequest
[Info - 12:35:33 PM] Result was System.Runtime.CompilerServices.AsyncTaskMethodBuilder
1+AsyncStateMachineBox
1[[MediatR.Unit, MediatR, Version=7.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2],[MediatR.Pipeline.RequestPreProcessorBehavior`2+d__2[[OmniSharp.Extensions.JsonRpc.EmptyRequest, OmniSharp.Extensions.JsonRpc, Version=0.14.0.0, Culture=neutral, PublicKeyToken=6d868dff454e6022],[MediatR.Unit, MediatR, Version=7.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2]], MediatR, Version=7.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2]][Info - 12:35:33 PM] Response value was (null)
[Info - 12:35:33 PM] Finished: Routing Request (1) shutdown in 13ms
Steps to reproduce
Connect to a LiveShare session hosted on VS 2019 (Windows).
Expected behavior
OmniSharp shouldn't die.
Actual behavior
Omnisharp dies immediately. The LiveShare session still works (I can view and edit code in it), but OmniSharp doesn't.
The text was updated successfully, but these errors were encountered: