microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
221 stars 10 forks source link

[BUG] Can't open c# project #679

Open danielpastoor opened 10 months ago

danielpastoor commented 10 months ago

Describe the Issue

Error occurred in launchDotNetServer: Error: Stream terminated before required bytes were read. Failed at 'Spawn .NET server' (2192ms) with error: Error: Stream terminated before required bytes were read. Failed at 'Clear environment' (2192ms) with error: Error: Stream terminated before required bytes were read. Failed at 'Open a solution with environment service' (2193ms) with error: Error: Stream terminated before required bytes were read. .NET server exited with null Failed at 'Open a solution' (2194ms) with error: SolutionOpenError: Run into errors while opening the solution: Error: Stream terminated before required bytes were read. Failed to open solution SolutionOpenError: Run into errors while opening the solution: Error: Stream terminated before required bytes were read.

Steps To Reproduce

No response

Expected Behavior

No response

Environment Information

Mac os vscode: Version: 1.84.0 (Universal) devkit : v1.0.14

tpetrina commented 9 months ago

Additional information:

Starting Open a solution...
Starting Open a solution with environment service...
Starting Clear environment...
Starting Spawn .NET server...
Using preinstalled .NET runtime at "/usr/local/share/dotnet/dotnet"
Using runtime installed in SDK.
.NET server STDERR: Unhandled exception. System.IO.IOException: The system cannot open the device or file specified. : '-228456190-ServiceHubControllerSingleInstanceMutex'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at Microsoft.ServiceHub.Controller.Controller.MainAsync(String pipeName, String[] args, String serializedTelemetrySession, Nullable`1 controllerCooldownTimeout)
   at Microsoft.ServiceHub.Controller.Program.Main(String[] args)

.NET server STDERR: Unhandled exception. Microsoft.ServiceHub.Client.ControllerConnectionException: Controller terminated before accepting connections. Exit code: 134.
   at Microsoft.ServiceHub.Client.HubControllerClient.StartAsync(ServiceHubConfig config, String clientName, CancellationToken cancellationToken)
   at Microsoft.ServiceHub.Client.HubClient.LaunchOrFindControllerAsync()
   at Microsoft.ServiceHub.Client.HubClient.GetLocationServiceAsync()
   at Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](Func`1 actionToExecute, TraceSource logger, ServiceHubRetryConfiguration`1 serviceHubRetryConfiguration, CancellationToken cancellationToken)
   at Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](Func`1 actionToExecute, TraceSource logger, ServiceHubRetryConfiguration`1 serviceHubRetryConfiguration, CancellationToken cancellationToken)
   at Microsoft.ServiceHub.Client.HubClient.GetThisAsRemoteServiceBrokerAsync()
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.RunAsync(Stream rpcStream, String bridgePipeName, ExportProvider exportProvider, Boolean includeServiceHub, String serviceHubConfigPath, Func`2 traceSourceFactory, TraceSource traceSource, TelemetrySession telemetrySession, TelemetryEvent perfTelemetryEvent, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.RunAsync(Stream rpcStream, String bridgePipeName, ExportProvider exportProvider, Boolean includeServiceHub, String serviceHubConfigPath, Func`2 traceSourceFactory, TraceSource traceSource, TelemetrySession telemetrySession, TelemetryEvent perfTelemetryEvent, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.<>c.<<BuildCommandLine>b__7_1>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass18_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass13_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass20_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__19_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>b__1_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
   at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
   at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.Main(String[] args)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.<Main>(String[] args)

.NET server STDERR: [createdump] Invalid process id: task_for_pid(66253) FAILED (os/kern) failure (5)
[createdump] This failure may be because createdump or the application is not properly signed and entitled.
[createdump] Failure took 0ms

.NET server STDOUT: [createdump] Target process is alive

Error occurred in launchDotNetServer: Error: Stream terminated before required bytes were read.
Failed at 'Spawn .NET server' (5572ms) with error: Error: Stream terminated before required bytes were read.
Failed at 'Clear environment' (5573ms) with error: Error: Stream terminated before required bytes were read.
Failed at 'Open a solution with environment service' (5573ms) with error: Error: Stream terminated before required bytes were read.
.NET server exited with null
Failed at 'Open a solution' (5581ms) with error: SolutionOpenError: Run into errors while opening the solution: Error: Stream terminated before required bytes were read.
Failed to open solution SolutionOpenError: Run into errors while opening the solution: Error: Stream terminated before required bytes were read.

macOS M1, Ventura 13.6 dotnet 8.0.100 VS Code Version: 1.84.2 (Universal) devkit: v1.0.14

Deadvi5 commented 8 months ago

Same here

zhoudi94 commented 6 months ago

I have the same problem

Extension Host output image

c# devkit output image

macOS M2,Sonoma 14.3.1 dotnet 7.0.404 vscode:1.86 devkit:1.3.10

github-actions[bot] commented 5 months ago

This issue has been marked as stale after 14 days of inactivity. @[ @ @], could you please take a look?

gonzalorf commented 4 months ago

Any news about this? I'm having the same problem.

andysleigh commented 4 months ago

Same here

vscode 1.88.1, M1 Mac 14.4.1, dotnet 8.0.201

georg138 commented 2 months ago

I had the same issue. After installing the current version of .NET 6 (6.0.31) to get GitExtensions working, it works. Before, I already had 6.0.30 installed (alongside with .NET 8.0.6 and others)

mumiman commented 11 hours ago

I try bwulms 's solution [https://github.com/microsoft/vscode-dotnettools/issues/1157] and it's work. "Solved by removing dotnet completely by deleting /usr/local/share/dotnet and then installing only the arm version of the dotnet 8 sdk."