vscode-csharp
vscode-csharp copied to clipboard
[Error - 13:33:58] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Type: Bug
Every time i try to open the .NET MAUI repo, i get a failure on the named pipes. I have removed the folder manual of the extension and restored all extensions again .
Using dotnet configured on PATH
Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[Error - 13:33:58] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: Timeout. Named pipe information not received from server.
at Function.<anonymous> (/Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.15.30-darwin-x64/dist/extension.js:2:1290803)
at Generator.next (<anonymous>)
at s (/Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.15.30-darwin-x64/dist/extension.js:2:1280740)
[stdout] {"pipeName":"/var/folders/4q/9688kc6n3xjbpw46t_5r5zvm0000gn/T/1aa5f40d.sock"}
received named pipe information from server
Extension version: 2.17.7 VS Code version: Code 1.86.0 (Universal) (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:29:15.765Z) OS version: Darwin x64 23.3.0 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 3, 6, 6 |
| Memory (System) | 32.00GB (0.19GB free) |
| Process Argv | --crash-reporter-id a73e0878-cfa0-416b-98bf-01503db16cd0 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
962ge761:30951796
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019b:30953937
b1063948:30958189
7j2b6412:30949929
bg6jg535:30958357
@rmarinho - if you change the dotnet.server.startTimeout configuration in vscode settings to a higher value (say 60000), does the error still appear?
Nop, didn't help. even with updated version
Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[Error - 11:34:22] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: Timeout. Named pipe information not received from server.
at Function.<anonymous> (/Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/dist/extension.js:2:1291052)
at Generator.next (<anonymous>)
at s (/Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/dist/extension.js:2:1280530)
[stdout] {"pipeName":"/var/folders/4q/9688kc6n3xjbpw46t_5r5zvm0000gn/T/3c333877.sock"}
That is weird - basically on the client side we're timing out waiting for that 'pipeName' message - but it does look like the pipe name is being sent (the last line in your logs). No matter how much you increase it, is that pipe name message always sent after it times out?
A couple more things to try
- Set the
dotnet.server.traceconfiguration in vscode settings toTrace, and paste the C# output window logs here - When you encounter that error, can you check if the language server process is running? Something like
ps -ef | grep 'Microsoft.CodeAnalysis.LanguageServer'
ruimarinho@iMSFT-MacBookPro maui % ps -ef | grep 'Microsoft.CodeAnalysis.LanguageServer'
501 3533 1 0 Fri10PM ?? 0:21.46 /usr/local/share/dotnet/dotnet /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Information --starredCompletionComponentPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp --devKitDependencyPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 1f2a6fc6-6123-4b43-bbed-9325631e29321707516536518 --telemetryLevel all --extensionLogDirectory /Users/ruimarinho/Library/Application Support/Code/logs/20240209T220853/window1/exthost/ms-dotnettools.csharp
501 30127 30032 0 12:36PM ?? 0:05.40 /usr/local/share/dotnet/dotnet /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Information --starredCompletionComponentPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp --devKitDependencyPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 207b8719-48b5-454a-a8d9-37fbbaadd26e1707914181384 --telemetryLevel all --extensionLogDirectory /Users/ruimarinho/Library/Application Support/Code/logs/20240209T231257/window2/exthost/ms-dotnettools.csharp
501 30441 46993 0 12:40PM ttys000 0:00.00 grep Microsoft.CodeAnalysis.LanguageServer
After I close VScode seems the process are still around ..
ruimarinho@iMSFT-MacBookPro maui % ps -ef | grep 'Microsoft.CodeAnalysis.LanguageServer'
501 3533 1 0 Fri10PM ?? 0:21.46 /usr/local/share/dotnet/dotnet /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Information --starredCompletionComponentPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp --devKitDependencyPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 1f2a6fc6-6123-4b43-bbed-9325631e29321707516536518 --telemetryLevel all --extensionLogDirectory /Users/ruimarinho/Library/Application Support/Code/logs/20240209T220853/window1/exthost/ms-dotnettools.csharp
501 30127 1 0 12:36PM ?? 0:05.41 /usr/local/share/dotnet/dotnet /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Information --starredCompletionComponentPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp --devKitDependencyPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.17.7-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 207b8719-48b5-454a-a8d9-37fbbaadd26e1707914181384 --telemetryLevel all --extensionLogDirectory /Users/ruimarinho/Library/Application Support/Code/logs/20240209T231257/window2/exthost/ms-dotnettools.csharp
501 30618 46993 0 12:42PM ttys000 0:00.00 grep Microsoft.CodeAnalysis.LanguageServer
I wonder if this is related with our cake scripts that launch vscode.
You could try to repo by cloning dotnet/maui
From home directory after installing .net8 sdk
sudo dotnet workload install maui
From dotnet/maui folder
dotnet tool restore
dotnet cake --target=VSCODE --workloads=global
Using dotnet configured on PATH
Dotnet path: /usr/local/share/dotnet/dotnet
Activating C# + C# Dev Kit + C# IntelliCode...
Starting server at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll
Server arguments /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Trace --starredCompletionComponentPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.vscodeintellicode-csharp-0.1.26-darwin-x64/components/starred-suggestions/node_modules/@vsintellicode/starred-suggestions-csharp --devKitDependencyPath /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslynDevKit/Microsoft.VisualStudio.LanguageServices.DevKit.dll --sessionId 093d821e-5b70-46a8-ab2d-a4f1066c5e1b1707933439355 --telemetryLevel all --extensionLogDirectory /Users/ruimarinho/Library/Application Support/Code/logs/20240214T175718/window1/exthost/ms-dotnettools.csharp
waiting for named pipe information from server...
[stdout] trce: Program[0]
.NET Runtime Version: .NET 7.0.16
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading DevKit assemblies from /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslynDevKit
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading Microsoft.VisualStudio.Utilities.Internal.dll
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading Microsoft.VisualStudio.Telemetry.dll
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading Microsoft.VisualStudio.LanguageServices.DevKit.dll
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading Microsoft.VisualStudio.Debugger.Contracts.dll
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading Microsoft.VisualStudio.RemoteControl.dll
[stdout] trce: Microsoft.CodeAnalysis.LanguageServer.ExportProviderBuilder[0]
Loading System.Configuration.ConfigurationManager.dll
[Error - 17:58:30] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
Error: Timeout. Named pipe information not received from server.
at Function.<anonymous> (/Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/dist/extension.js:2:1291159)
at Generator.next (<anonymous>)
at s (/Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/dist/extension.js:2:1281031)
[stdout] dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Remote.Workspaces.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version2_X.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Language.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Scripting.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version1_X.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Elfie.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Features.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.CSharp.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.AnalyzerUtilities.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
Solution-level analyzer at /Users/ruimarinho/.vscode/extensions/ms-dotnettools.csharp-2.18.15-darwin-x64/.roslyn/Microsoft.CodeAnalysis.Features.dll added to workspace.
[stdout] {"pipeName":"/var/folders/4q/9688kc6n3xjbpw46t_5r5zvm0000gn/T/9b238260.sock"}
received named pipe information from server
Thanks for the updated logs. So a couple things
- There is an issue on the extension side where if the client failed to connect to the named pipe it would be reported as a time out. The next prerelease should instead output the actual error that happened in the C# logs.
- Other users mentioned here that this stopped working when local admin rights were removed - is that something that might have happened on your side? - https://github.com/dotnet/vscode-csharp/issues/6842 .
a. Does your user have read/write permissions to the location where we're trying to create the named pipe -
/var/folders/4q/9688kc6n3xjbpw46t_5r5zvm0000gn/T/9b238260.sock? - I'm working remotely at the moment and don't have my mac with me, I'll be back next week with my mac and will try it there. I tried on my windows box and didn't have any issues.
Closing, likely duplicate of https://github.com/dotnet/vscode-csharp/issues/6842 Please try out the latest version of the extension. If it is still not working, feel free to re-open and include the latest logs (and check item 2.a above).