Skip to content

Language server cannot start on mac os #6485

Closed
@david-ergoss

Description

I have this error every time I try to load a C# project about the path to the socket being too long.
(By the way the report an issue command does not work either: command 'csharp.reportIssue' not found).

Environment data

dotnet --info output:
.NET SDK:
Version: 7.0.307
Commit: 7b77e35a2b

Runtime Environment:
OS Name: Mac OS X
OS Version: 14.0
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/7.0.307/

Host:
Version: 7.0.10
Architecture: arm64
Commit: a6dbb800a4

.NET SDKs installed:
2.1.818 [/usr/local/share/dotnet/sdk]
6.0.400 [/usr/local/share/dotnet/sdk]
6.0.401 [/usr/local/share/dotnet/sdk]
6.0.413 [/usr/local/share/dotnet/sdk]
7.0.307 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.21 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.21 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
x64 [/usr/local/share/dotnet/x64]
registered at [/etc/dotnet/install_location_x64]

Environment variables:
Not set

global.json file:
Not found
VS Code version: 1.83.0
C# Extension version: 2.5.3

OmniSharp log

Failed to find dotnet info from path, falling back to acquire runtime via ms-dotnettools.vscode-dotnet-runtime
The architecture of the .NET runtime (undefined) does not match the architecture of the extension (arm64).
Dotnet path: /Users/david/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/7.0.11~arm64/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[stderr] Unhandled exception: System.ArgumentOutOfRangeException: The path '/var/folders/rh/p2xvyg710y15pmy1bf75ds340000gn/T/com.apple.shortcuts.mac-helper/f2622daa-af31-4dce-bb8e-787f1d869eba.sock' is of an invalid length for use with domain sockets on this platform. The length must be between 1 and 104 characters, inclusive. (Parameter 'path')
Actual value was /var/folders/rh/p2xvyg710y15pmy1bf75ds340000gn/T/com.apple.shortcuts.mac-helper/f2622daa-af31-4dce-bb8e-787f1d869eba.sock.
at System.Net.Sockets.UnixDomainSocketEndPoint..ctor(String path, String boundFileName)
at System.IO.Pipes.NamedPipeServerStream.SharedServer..ctor(String path, Int32 maxCount)
at System.IO.Pipes.NamedPipeServerStream.SharedServer.Get(String path, Int32 maxCount)
at System.IO.Pipes.NamedPipeServerStream.Create(String pipeName, PipeDirection direction, Int32 maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options, Int32 inBufferSize, Int32 outBufferSize, HandleInheritability inheritability)
at System.IO.Pipes.NamedPipeServerStream..ctor(String pipeName, PipeDirection direction, Int32 maxNumberOfServerInstances, PipeTransmissionMode transmissionMode, PipeOptions options)
at Program.<

$>g__RunAsync|0_0(ServerConfiguration serverConfiguration, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs:line 107
at System.CommandLine.CliCommand.<>c__DisplayClass32_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.AnonymousCliAction.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Language server process exited with 1
[Error - 16:28:55] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions