dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.88k stars 677 forks source link

Error "Couldn't start client Razor Language Server" when omnisharp.useModernNet=true on MacOS with arm64 #5093

Open marcinci opened 2 years ago

marcinci commented 2 years ago

Issue Description

"Couldn't start client Razor Language Server" popup window appears with error in Razor Log. Error shows up in Razor Log, so it might not be directly related with C# extension. Nevertheless, it seems like the component is used by C# extension.

Steps to Reproduce

1) Change omnisharp.useModernNet to true 2) Create a Blazor project with command: dotnet new blazorserver -f net6.0 3) Open new Blazor project.

Expected Behavior

No error appears.

Actual Behavior

"Couldn't start client Razor Language Server" popup window appears with error in Razor Log.

error_message

Logs

OmniSharp log

Starting OmniSharp server at 3/6/2022, 12:59:29 PM Target: /Users/myusername/IdeaProjects/BlazorApp

OmniSharp server started with .NET 6.0.102 . Path: /Users/myusername/.vscode/extensions/ms-dotnettools.csharp-1.24.1/.omnisharp/1.38.1-net6.0/OmniSharp.dll PID: 6523

    Starting OmniSharp on Unknown 0.0 (Unknown)
    Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
    Using the 'dotnet' on the PATH.
    DotNetPath set to dotnet
    Located 2 MSBuild instance(s)
        1: .NET Core SDK 6.0.102 17.0.0 - "/usr/local/share/dotnet/sdk/6.0.102/"
        2: .NET Core SDK 6.0.101 17.0.0 - "/usr/local/share/dotnet/sdk/6.0.101/"
    Registered MSBuild instance: .NET Core SDK 6.0.102 17.0.0 - "/usr/local/share/dotnet/sdk/6.0.102/"
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
    No solution files found in '/Users/myusername/IdeaProjects/BlazorApp'
    Queue project update for '/Users/myusername/IdeaProjects/BlazorApp/BlazorApp.csproj'
    Detecting CSX files in '/Users/myusername/IdeaProjects/BlazorApp'.
    Did not find any CSX files
    Configuration finished.
    Omnisharp server running using Stdio at location '/Users/myusername/IdeaProjects/BlazorApp' on host 6492.
    Loading project: /Users/myusername/IdeaProjects/BlazorApp/BlazorApp.csproj
    Successfully loaded project file '/Users/myusername/IdeaProjects/BlazorApp/BlazorApp.csproj'.
    Adding project '/Users/myusername/IdeaProjects/BlazorApp/BlazorApp.csproj'
    Update project: BlazorApp

Razor log


Razor.VSCode version 6.0.0-preview.5.21358.6

Razor's trace level is currently set to 'Off'

[Error - 12:59:29 PM] Starting client failed Error: spawn Unknown system error -86 at ChildProcess.spawn (internal/child_process.js:403:11) at Object.spawn (child_process.js:570:9) at /Users/myusername/.vscode/extensions/ms-dotnettools.csharp-1.24.1/dist/extension.js:2:1060499

C# log

Empty

Environment information

VSCode version: 1.65.0 C# Extension: 1.24.1

Mono Information OmniSharp using built-in mono
Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.102 Commit: 02d5242ed7 Runtime Environment: OS Name: Mac OS X OS Version: 12.2 OS Platform: Darwin RID: osx.12-arm64 Base Path: /usr/local/share/dotnet/sdk/6.0.102/ Host (useful for support): Version: 6.0.2 Commit: 839cdfb0ec .NET SDKs installed: 6.0.101 [/usr/local/share/dotnet/sdk] 6.0.102 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |csharp|ms-dotnettools|1.24.1|;
timanderson commented 2 years ago

I get the same error.

Enver-Yilmaz commented 2 years ago

I get the same error, this may have happened when rosetta is not installed.

tverboon commented 2 years ago

@JoeRobich Any idea when the Razor LSP for ARM64 is included in Omnisharp? Thanks!