Visitar URL original
Unhanded exception at GitHub.Infrastructure.ExportedHttpClient..ctor() · Issue #2188 · github/VisualStudio · GitHub
Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Unhanded exception at GitHub.Infrastructure.ExportedHttpClient..ctor() #2188

Description

@irishismyname

Versions

  • GitHub Extension for Visual Studio version: 2.7.0.6566
  • Visual Studio version: 2017 (15.9.5)

What happened

Visual Studio crashes when interacting with the plugin while I'm connected to and Enterprise repository. Rolling back to the previous 2.6 version seems to fix the issue for us.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Connect to an Enterprise server.
  2. Clone/create/interact with a repository via Team Explorer.
  3. WerFault.exe goes off the rails with a never ending thread.
  4. Visual Studio locks up.
  5. If you kill WerFault, you get the error message below.

We were able to reproduce this from Windows 7 x64 and Windows 10.

Screenshots

image

Logs

From event log:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.MissingMethodException
   at GitHub.Infrastructure.ExportedHttpClient..ctor()
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(System.Exception)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(System.Exception)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(System.Exception)
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(System.Exception)

Exception Info: Microsoft.VisualStudio.Composition.CompositionFailedException
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveNext(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveToState(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker, RuntimeImport, RuntimeExport, System.Func`3<System.Func`1<System.Object>,System.Object,System.Object>)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker, RuntimeImport)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport)
   at System.Linq.Enumerable+WhereSelectArrayIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Buffer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToArray[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveNext(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveToState(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.DelegateServices+<>c__DisplayClass2_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<As>b__0()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
   at GitHub.Api.SimpleApiClient+<HasWikiInternal>d__22.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at GitHub.Api.SimpleApiClient+<GetRepositoryInternal>d__19.MoveNext()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveToState(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker, RuntimeImport, RuntimeExport, System.Func`3<System.Func`1<System.Object>,System.Object,System.Object>)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker, RuntimeImport)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport)
   at System.Linq.Enumerable+WhereSelectArrayIterator`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
   at System.Linq.Buffer`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToArray[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveNext(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.MoveToState(PartLifecycleState)
   at Microsoft.VisualStudio.Composition.ExportProvider+PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory+RuntimeExportProvider+<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.DelegateServices+<>c__DisplayClass2_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<As>b__0()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateValue()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].LazyInitValue()
   at System.Lazy`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].get_Value()
   at GitHub.Api.SimpleApiClient+<IsEnterpriseInternal>d__23.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at GitHub.Api.SimpleApiClient+<IsEnterprise>d__21.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at GitHub.VisualStudio.Base.TeamExplorerItemBase+<GetRepositoryOrigin>d__18.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at GitHub.VisualStudio.Base.TeamExplorerItemBase+<IsAGitHubRepo>d__19.MoveNext()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   at GitHub.VisualStudio.TeamExplorer.Home.GitHubHomeSection+<RepoChanged>d__9.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0(System.Object)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory+SingleExecuteProtector.TryExecute()
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory+SingleExecuteProtector+<>c.<.cctor>b__20_0(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Followed by:

Faulting application name: devenv.exe, version: 15.9.28307.280, time stamp: 0x5c2fb055
Faulting module name: KERNELBASE.dll, version: 6.1.7601.24308, time stamp: 0x5be85d6b
Exception code: 0xe0434352
Fault offset: 0x0000c54f
Faulting process id: 0x1604
Faulting application start time: 0x01d4b1b2395fd6a8
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 7f852c78-1da5-11e9-973e-f0d5bf5fb990

Activity

  1. jcansdale commented on Jan 21, 2019

    @jcansdale
    Collaborator

    Hi @irishismyname,

    I've been researching this issue today.

    Could you try installing the following version and let me know if that fixes it?
    https://ci.appveyor.com/api/buildjobs/tfpwdyf0c3xi7ps2/artifacts/2.6.1.6227%2FGitHub.VisualStudio.vsix

    Thanks!

  2. jcansdale commented on Jan 22, 2019

    @jcansdale
    Collaborator

    Could you try creating and running a console app with the following method:

            static void Main()
            {
                Console.WriteLine(Assembly.Load("System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"));
                Console.ReadLine();
            }

    I'm interested to know if it outputs System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or throws an exception.

  3. irishismyname commented on Jan 22, 2019

    @irishismyname
    Author

    Console app threw the following exception:

    System.IO.FileNotFoundException
      HResult=0x80070002
      Message=Could not load file or assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
      Source=mscorlib
      StackTrace:
       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
       at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at Issue2118Test.Program.Main() in D:\Users\204075855\Source\Repos\Issue2118Test\Issue2118Test\Program.cs:line 14
    
  4. irishismyname commented on Jan 22, 2019

    @irishismyname
    Author

    Hi @irishismyname,

    I've been researching this issue today.

    Could you try installing the following version and let me know if that fixes it?
    https://ci.appveyor.com/api/buildjobs/tfpwdyf0c3xi7ps2/artifacts/2.6.1.6227%2FGitHub.VisualStudio.vsix

    Thanks!

    I rolled back to v2.6.1.6227 through the VS add-ins/extensions manager and that fixed the issue. Is this a link to that same version?

  5. jcansdale commented on Jan 22, 2019

    @jcansdale
    Collaborator

    @irishismyname Phew! That exception is what I was hoping would happen.

    Could you try the build at the top of this PR #2191. You should be able to simply open the .vsix file, since it is a higher version to what you have installed (no need to uninstall). If you could comment there on whether it works or not, that would be much appreciated. 🙏

  6. irishismyname commented on Jan 22, 2019

    @irishismyname
    Author

    @jcansdale the version you supplied above seems to work.

  7. jcansdale commented on Jan 22, 2019

    @jcansdale
    Collaborator

    @irishismyname that's good to hear! Can I double-check this was the link from PR #2191?

  8. irishismyname commented on Jan 22, 2019

    @irishismyname
    Author

    Using 2.8.0.6585 from PR #2191.

    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions