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
216 stars 9 forks source link

[BUG] Unable to start extension #1256

Open mattywarr opened 1 month ago

mattywarr commented 1 month ago

Describe the Issue

When trying to use a version higher than 1.4.29, the extension fails to start on my computer and I don't know why. Only started happening late last week when I updated to latest prerelease 1.8.10 from 1.8.8. Rolling back to any version since to 1.4.29 does not work.

C# Extension Output Log

[Error - 9:19:31 AM] Microsoft.CodeAnalysis.LanguageServer client: couldn't create connection to server.
SyntaxError: Unexpected token '... is not valid JSON
    at JSON.parse (<anonymous>)
    at f (c:\Users\Matthew.Warr\.vscode\extensions\ms-dotnettools.csdevkit-1.8.10-win32-x64\dist\extension.js:2:1426415)

image

C# Dev Kit Output Log

Saving VSCode common properties failed: SyntaxError: Unexpected token '...... is not valid JSON
#getSession: Failed to running method. Error: 'Canceled: Canceled'
Starting Spawn .NET server...
#getSession: Failed to running method. Error: 'Canceled: Canceled'
#getSession: Failed to running method. Error: 'Canceled: Canceled'
More than one solution files in the workspace. Waiting for the developer to make a choice.
Using preinstalled .NET runtime at "C:\Program Files\dotnet\dotnet.exe"
.NET server STDERR: Unhandled exception. 
.NET server STDERR: System.ArgumentNullException: Value cannot be null. (Parameter 'filePath')
   at Microsoft.VisualStudio.Telemetry.CommonProperty.CommonPropertyParserFactory.GetCommonPropertyParser(TelemetrySessionInternalBase session)
   at Microsoft.VisualStudio.Telemetry.TelemetrySessionInternalBase.LoadCommonProperties()
   at Microsoft.VisualStudio.ManagedTelemetry.VSCodeTelemetry.CreateAndStartDefaultSession(String sessionSettings)
   at Microsoft.VisualStudio.ManagedTelemetry.VSCodeTelemetry.StartTelemetrySessionAndCollector(String vsCodeTelemetryLevel, String customSessionId)
   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)

Error occurred in launchDotNetServer: Error: Stream terminated before required bytes were read.
Failed at 'Spawn .NET server' (7213ms) with error: Error: Stream terminated before required bytes were read.
.NET server exited with 3762504530

image

Steps To Reproduce

Install the extension higher than 1.4.29 on my computer. It appears to be environmental in some way so not really reproducible (Works OK on my Mac)

Expected Behavior

I expect the extension to start

Environment Information

Windows 10 VS Code 1.90.2 System (Though user version is the same)

dositec commented 1 month ago

Ou, I have same, I thought it's only my local bug or it's sanction bug because I'm from Russia. I have installed VSCodium but out of the box it cannot debug tests.

dibarbet commented 1 month ago

I don't believe this is Roslyn. Roslyn is failing to start because DevKit is failing to start. Looks like an issue reading telemetry properties?

Tagging @jonathanjyi

jonathanjyi commented 1 month ago

@mattywarr could you provide a copy of the file located at: %Temp%\csdevkit\Telemetry\Resources.json

Please "REDACT" any personal information you need to.

jonathanjyi commented 1 month ago

@mattywarr , @dositec if you delete the files under %Temp%\csdevkit and restart, does it resolve your issue?

mattywarr commented 1 month ago

No need to redact, the resources file looks borked. image

But as you indicated, deleting the contents of the temp folder seems to have resolved it!

github-actions[bot] commented 1 month ago

@jonathanjyi, the 'needs-more-info' label has been removed upon receiving further response from the original bug filer.

dositec commented 1 month ago

I

No need to redact, the resources file looks borked. image

But as you indicated, deleting the contents of the temp folder seems to have resolved it!

I had the same file content but I have fixed the problem, I cleanup temp folder, and tuned bios to normal mode(was fast) + disable "x.m.p." (motherboard - ASUS).

jonathanjyi commented 1 month ago

Thanks for the updates @dositec @mattywarr , I'm investigating how these files are getting corrupted now.