Closed 3x0dv5 closed 2 years ago
This was fully fixed by https://github.com/dotnet/roslyn/pull/58024, we had a hack in place to squelch this issue for 17.0.1 (which was merged in https://github.com/dotnet/roslyn/pull/57680).
@3x0dv5 unfortunately neither of those are present in 17.1 Previews; the Preview 2 build will contain the hack so that should be good. Preview 2 isn't out yet but should be in the next week or so. In the mean time, I'd suggest running 17.0.1.
Good stuff, once it's up I'll install Preview 2. For now I keep working around it. Thanks!
And Preview 2's date was delayed a bit so "next week" won't be the case. :smile:
it is what it is... better a delay than a bad release. New year, new Visual Studio version!
@3x0dv5 Preview 2 is now out, if that helps!
@jasonmalinowski Initial tests, so far so good. Thank you!
Hi! I have a similar problem.
Version Used: Visual Studio 2022 - Version 17.1.0 Preview 4 with CodeRush fo VS 2022 21.2.6 dotnet core 6
The stack trace is common for all services:
StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I also found crash dumps of ServiceHub.RoslynCodeAnalysisService.exe.
Unhandled exception at 0x00007FF92C7A0E89 in ServiceHub.RoslynCodeAnalysisService.exe.28116.dmp: 0xC00000FD: Stack overflow (parameters: 0x0000000000000001, 0x000000E24C805F68).
ServiceHub.RoslynCodeAnalysisService.exe.28116.zip
Here is a project to reproduce: GrpcService1.zip
Is it the same issue or separate?
Getting same issue today in version 17.4.2 :(
Same issue in version 17.4.2 popped up for me this week when I went to set up a new machine, so it seems the issue isn't fully resolved.
StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService,TResult](<Unknown Parameters>)
I'm not doing anything in particular when it happens. I open a solution i've worked in for years on a previous machine, VS2022 on that machine has no issues. After coding for a bit this will happen and my intellisense drops. After restart it will work again for a few minutes. Other, smaller solutions seem to work for longer but will also get the issue sometimes.
Fully fresh install of VS 2022, no extensions added. I even ran the InstallCleanup.exe
step from here https://docs.microsoft.com/en-us/visualstudio/install/uninstall-visual-studio?view=vs-2022 to do a completely fresh install.
Since this is related to Microsoft.CodeAnalysis
, could it somehow be the .net installation? Should I try to reinstall .NET 6 on my machine?
My only other idea is that there could be some policy on my machine that is causing the JSON-RPC call to not be allowed? I'm not sure what it's connecting to though so not sure what to look for there.
Running .\devenv.exe /safemode
i get an exception at startup:
Log file shows this stack trace:
6/17/2022 10:17:15 AM
LimitedFunctionality
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.ProjectSystem.VS.MissingSetupComponentRegistrationService.AddMissingSdkRuntimeComponentIds(IVsSetupCompositionService setupCompositionService, Dictionary`2 vsComponentIdsToRegister)
at Microsoft.VisualStudio.ProjectSystem.VS.MissingSetupComponentRegistrationService.ComputeVsComponentIdsToRegister(IVsSetupCompositionService setupCompositionService)
at Microsoft.VisualStudio.ProjectSystem.VS.MissingSetupComponentRegistrationService.<DisplayMissingComponentsPromptAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__Action|0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.ProjectSystem.VS.MissingSetupComponentRegistrationService.AddMissingSdkRuntimeComponentIds(IVsSetupCompositionService setupCompositionService, Dictionary`2 vsComponentIdsToRegister)
at Microsoft.VisualStudio.ProjectSystem.VS.MissingSetupComponentRegistrationService.ComputeVsComponentIdsToRegister(IVsSetupCompositionService setupCompositionService)
at Microsoft.VisualStudio.ProjectSystem.VS.MissingSetupComponentRegistrationService.<DisplayMissingComponentsPromptAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>g__Action|0()
at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---
===================
This makes it seem like something is broken with my VS2022 installation. As mentioned before, I've already tried a repair and a full reinstall. Unless anyone has any other ideas, my only idea i can think of at this point is to have IT reimage my entire machine and do a new install.
Found a similar issue here: https://developercommunity.visualstudio.com/t/issue-opening-visual-studio-2022-ide-after-new-ins/1631790
The solution to this was to remove newtonsoft.json from the GAC. My GAC does not have newtonsoft.json in it so this doesn't help.
ActivityLog.xml is showing me other errors.
Many like this with different dlls:
Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.VisualStudio.ConnectedServices.Package2, Version=17.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\WEB TOOLS\ProjectSystem\Microsoft.WebTools.ProjectSystem.Components.dll
This path exists on my disk, not sure why it can't find it.
Then some others, this one stands out to me:
Microsoft.ServiceHub.Framework.ServiceActivationFailedException: Activating the "Microsoft.VisualStudio.TraceHubCommand (1.0)" service failed.
---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at Microsoft.VisualStudio.Services.VSGlobalBrokeredServiceContainer.PackageServiceRegistration.<LoadProfferingPackageAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.<LoadProfferingPackageAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.<TryGetProfferingSourceAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.<GetProxyAsync>d__19`1.MoveNext()
--- End of inner exception stack trace ---
Then at the bottom i'm seeing this one:
SetSite failed for package [Microsoft.VisualStudio.PlatformUI.NavigateToPackage]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Language.NavigateTo.Interfaces, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
@DrLeh Thanks for reporting the issue. Would you mind filing VS Feedback from Visual Studio (menu Help > Send Feedback > Report a Problem)? It will collect logs that will help us to diagnose the problem.
@tmat when I select Report a Problem, I got the error to connect my account. After refreshing my credentials, Report a Problem does nothing. Sounds like my VS is super borked.
Did a VS repair, still nothing on the report a problem button.
I'm facing the same error
Visual Studio Community 2022 17.2.4
I've tried VS repair but didn't work
I've noticed that when I run my VS as administrator I get this error but when I run as "normal" mode this error doesn't occur
I have also been encountering it more on a solution that has net472 web apps in it. My other solutions in net 6 didn't cause a failure after a full work day
@lrslima @DrLeh what are the stack traces you are seein gthere? These notifications can happen for numerous reasons, so without additional information, we won't know what the case is here. Note: we do automatically report these as well through VS's telemetry system. So if you are not opted out of that, we will have the data on these.
@CyrusNajmabadi When I try to report as administrator my VS crashes.
from ActivityLog.xml file
<entry>
<record>325</record>
<time>2022/06/20 21:13:32.710</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Global Hub Client Package]Source: 'Microsoft.ServiceHub.Client' Description: Microsoft.ServiceHub.Controller.exe exited normally before accepting connection. Increasing the controller cooldown timeout may be necessary.
</description>
<guid>{11AD60FC-6D87-4674-8F88-9ABE79176CBE}</guid>
<hr>80131509</hr>
<errorinfo></errorinfo>
</entry>
@lrslima I mean this part:
@CyrusNajmabadi
Microsoft.ServiceHub.Framework.ServiceActivationFailedException : Activating the "Microsoft.VisualStudio.LanguageServices.ProcessTelemetry64" service failed. ---> System.InvalidOperationException : An operation is not legal in the current state. (Exception from HRESULT: 0x80131509)
at Microsoft.VisualStudio.Shell.Interop.IVsTaskBody.DoWork(IVsTask pTask,UInt32 dwCount,IVsTask[] pParentTasks,Object& pResult)
at Microsoft.VisualStudio.Services.VsTask.<>cDisplayClass86_0.1[] _) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)
at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)
at async Microsoft.VisualStudio.Services.VSGlobalBrokeredServiceContainer.PackageServiceRegistration.LoadProfferingPackageAsync(1.<>c__DisplayClass13_0.<GetValueAsync>b__0[T](<Unknown Parameters>) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at async Microsoft.ServiceHub.Framework.ServiceBrokerClient.GetProxyAsync[T](<Unknown Parameters>) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.Tasks.ValueTask
1.get_Result()
at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection1.RentServiceAsync[TService](<Unknown Parameters>) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.Tasks.ValueTask
1.get_Result()
at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](
@lrslima could you please open a new issue? your stck trace is untirely unrelated to the stack of hte fixed crash references in this issue. Thanks!
@CyrusNajmabadi here's the stack traces i get
StreamJsonRpc.ConnectionLostException : The JSON-RPC connection with the remote party was lost before the request could complete.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.TryInvokeAsync[TService](<Unknown Parameters>)
@DrLeh please open a different issue. Add your can see, your callstacks are different from this issue and from @lrslima
This is following up from the comments I posted on https://github.com/dotnet/roslyn/issues/54204, the although the UI is reporting the same problem it is not the same underlying problem
Version Used: Visual Studio 2022 - Version 17.1.0 Preview 1.1 with Resharper 2021.3 EAP10 dotnet core 6
Steps to Reproduce: hi, just got the error. It happened when on a Blazor App I was editing a razor file. When in the razor file I tried to use a variable that hadn't been declared yet.
The stack traces: For Documents highlights
for semantic classification
for Navigation bar
for semantic classification cache
now the only way to stop getting these errors is to restart visual studio, otherwise any action - click, typing - I do will bring the 4 errors back.