microsoft / vs-ng-language-service

Visual Studio extension for the Angular Language Service
MIT License
43 stars 15 forks source link

The extension causes an error when starting visual studio #11

Closed jordanCht closed 1 year ago

jordanCht commented 4 years ago

Hi, I've got a problem after installing the extension. On startup Visual Studio display an error banner, freeze and finally crash. Here the relative error log :

  <entry>
    <record>668</record>
    <time>2020/08/12 06:48:27.438</time>
    <type>Error</type>
    <source>Extension Manager</source>
    <description>Extension will not be loaded because an extension with the same ID &apos;Microsoft.Windows.DevelopmentKit.Desktop&apos; is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\10\DESKTOP SDK\...</description>
    <path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\</path>
  </entry>
  <entry>
    <record>669</record>
    <time>2020/08/12 06:48:27.439</time>
    <type>Error</type>
    <source>Extension Manager</source>
    <description>Extension will not be loaded because an extension with the same ID &apos;Microsoft.Windows.DevelopmentKit.WindowsStore&apos; is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\10\WINDOWS STORE SDK\...</description>
    <path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\WINDOWS STORE SDK\</path>
 </entry>
minestarks commented 4 years ago

Hi @jordanCht, unfortunately this error log isn't enough for us to understand what the problem is. The logs you shared are talking about the Microsoft.Windows.DevelopmentKit.WindowsStore extension, not the Angular one. Could you provide a few more details? What exactly are your repro steps and what error message are you seeing? Does the problem stop occurring after you disabled the Angular extension?

You may also want to use Visual Studio's "Help -> Report A Problem" tool to submit a problem report, which will include some more diagnostic information for us to be able to diagnose the problem. If you do that, feel free to share the link here so we can take a look.

PinBack23 commented 4 years ago

I think I have the same problem. When I open a .ts or .html file I also get an error banner with the message "There was an error activating the remote language server, Angular Language Service Extension ... When I start Visual Studio with "devenv /log" and open my .net core/angular project I get the following error entry in ActivityLog.xml:

<entry>
  <record>1028</record>
  <time>2020/08/25 07:23:16.792</time>
  <type>Error</type>
  <source>Angular Language Service Extension</source>
  <description>System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.&lt;GetAndSendAllRelevantOpenedDocumentsAsync&gt;d__86.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.&lt;InitializeAsync&gt;d__77.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageClientInstance.&lt;OnRpcDisconnected&gt;d__85.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)</description>
</entry>

Perhaps that is an issue because my app is a .net core/angular app created from the VS Template (angular app is located in the subfolder "ClientApp")

minestarks commented 4 years ago

@pinback23 Your problem sounds distinct from the OP's. However I searched through known issues on our end and found that there may be a similar NullReferenceException thrown when you have a Class Diagram open in the editor. This is a wild guess, but do you happen to have a Class Diagram open in your editor? Could you try closing all other open documents in the editor and let me know if it reproduces?

If you're still seeing the issue you may want to use Visual Studio's "Help -> Report A Problem" tool to submit a problem report, which will include some more diagnostic information for us to be able to diagnose the problem. If you do that, feel free to share the link here so we can take a look.

PinBack23 commented 4 years ago

No there is no Class Diagramm and I open only one file (.html or .ts) in my solution. I created a new problem report: https://developercommunity.visualstudio.com/content/problem/1163089/angular-language-service-for-visual-studio-causes.html

minestarks commented 4 years ago

@pinback23 thank you, that helps a lot! We're taking a look now.

luizfbicalho commented 3 years ago

I have problems everytime I open a angular file. here is the log

ActivityLog.zip

marcinwas commented 3 years ago

Having same problem in Visual Studio 2019 after installing Angular Languages Service Extension :( Here is my ActivityLog.xml:

<entry>
    <record>838</record>
    <time>2020/12/07 15:29:52.156</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.AggregateException: One or more errors occurred. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at AngularLanguageService.AngularLanguageClient.MiddleLayerProvider.&lt;HandleRequestAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.&lt;&gt;c__DisplayClass4_0`3.&lt;&lt;SendMiddleLayerRequestAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteHoverBroker.&lt;ResolveHoverRequestsAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.ThreadingTools.&lt;WithCancellationSlow&gt;d__8`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.SynchronizationManager.&lt;QueueRequestTaskAsync&gt;d__5`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.HoverSource.&lt;GetQuickInfoItemAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;ComputeSourceContentAsync&gt;d__39.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;UpdateAsync&gt;d__32.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoPresentationSession.&lt;UpdateAsync&gt;d__5.MoveNext()&#x000D;&#x000A;---&gt; (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at AngularLanguageService.AngularLanguageClient.MiddleLayerProvider.&lt;HandleRequestAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.&lt;&gt;c__DisplayClass4_0`3.&lt;&lt;SendMiddleLayerRequestAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at 
Microsoft.VisualStudio.LanguageServer.Client.RemoteHoverBroker.&lt;ResolveHoverRequestsAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.ThreadingTools.&lt;WithCancellationSlow&gt;d__8`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.SynchronizationManager.&lt;QueueRequestTaskAsync&gt;d__5`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.HoverSource.&lt;GetQuickInfoItemAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;ComputeSourceContentAsync&gt;d__39.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&lt;---&#x000D;&#x000A;</description>
  </entry>
pamcpd commented 3 years ago

Having the exact same issue with the Angular Languages Service as @marcinwas

goblinss commented 3 years ago

Me too

EvanSevy commented 3 years ago

Me as well.

KhaledAwashreh commented 3 years ago

same problem

minestarks commented 3 years ago

@PranavSenthilnathan has this been addressed in #15 ?

Chieleman commented 3 years ago

Any insight on when there will be a new version, with this fix, available in visual studio (2019)?

RomaDemiurg commented 3 years ago

same problem in Visual Studio 2019 after installing Angular Languages Service Extension

<entry>
    <record>819</record>
    <time>2021/03/01 21:23:26.515</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.AggregateException: One or more errors occurred. ---&gt; System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at AngularLanguageService.AngularLanguageClient.MiddleLayerProvider.&lt;HandleRequestAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.&lt;&gt;c__DisplayClass4_0`3.&lt;&lt;SendMiddleLayerRequestAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteHoverBroker.&lt;ResolveHoverRequestsAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.ThreadingTools.&lt;WithCancellationSlow&gt;d__8`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.SynchronizationManager.&lt;QueueRequestTaskAsync&gt;d__5`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.HoverSource.&lt;GetQuickInfoItemAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;ComputeSourceContentAsync&gt;d__39.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&#x000D;&#x000A;   --- End of inner exception stack trace ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;UpdateAsync&gt;d__32.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoPresentationSession.&lt;UpdateAsync&gt;d__5.MoveNext()&#x000D;&#x000A;---&gt; (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at AngularLanguageService.AngularLanguageClient.MiddleLayerProvider.&lt;HandleRequestAsync&gt;d__4.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.JsonRpcExtensionMethods.&lt;&gt;c__DisplayClass4_0`3.&lt;&lt;SendMiddleLayerRequestAsync&gt;b__0&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.RemoteHoverBroker.&lt;ResolveHoverRequestsAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Threading.ThreadingTools.&lt;WithCancellationSlow&gt;d__8`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.SynchronizationManager.&lt;QueueRequestTaskAsync&gt;d__5`1.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.LanguageServer.Client.HoverSource.&lt;GetQuickInfoItemAsync&gt;d__5.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)&#x000D;&#x000A;   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A;   at Microsoft.VisualStudio.Language.Intellisense.Implementation.AsyncQuickInfoSession.&lt;ComputeSourceContentAsync&gt;d__39.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)&lt;---&#x000D;&#x000A;</description>
</entry>
PranavSenthilnathan commented 3 years ago

This will be fixed with #15 when it is released.