Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompositionFailedException when opening Team Explorer window #986

Open
AlexEyler opened this issue May 10, 2017 · 11 comments
Open

CompositionFailedException when opening Team Explorer window #986

AlexEyler opened this issue May 10, 2017 · 11 comments
Labels
Projects

Comments

@AlexEyler
Copy link

@AlexEyler AlexEyler commented May 10, 2017

  • GitHub Extension for Visual Studio version: unsure
  • Visual Studio version: 15.2 (build 15.0.26430.4)

What happened (with steps, logs and screenshots, if possible)
It appears that on some machines with 15.2 installed, users are seeing a CompositionFailedException from GitHub when opening the team explorer window. I've seen the same being reported in telemetry from the 15.2 release.

The callstack is:

Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.Services.VSGitServices". ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at GitHub.VisualStudio.GitHubProviderDispatcher.GetService[T]() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio\Services\GitHubServiceProvider.cs:line 63
   at GitHub.Services.VSGitServices..ctor(IGitHubServiceProvider serviceProvider) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Services\VSGitServices.cs:line 40
   --- End of inner exception stack trace ---
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.<CreateExportFactoryExport>b__1()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.<CreateExportFactory>b__0()
   at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart()
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export)
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_0`2.<CreateStronglyTypedExportFactoryOfTM>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass53_0.<CreateExport>b__0()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass55_0.<CreateExportFactoryExport>b__1()
   at Microsoft.VisualStudio.Composition.ExportProvider.<>c__DisplayClass54_0.<CreateExportFactory>b__0()
   at Microsoft.VisualStudio.Composition.DelegateServices.<>c__DisplayClass2_0`1.<As>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.ComposablePartDefinitionForExportFactory.CreatePart()
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.LifetimeContext.GetExportLifetimeContextFromExport[T](Export export)
   at System.ComponentModel.Composition.ReflectionModel.ExportFactoryCreator.<>c__DisplayClass6_0`2.<CreateStronglyTypedExportFactoryOfTM>b__0()
   at System.ComponentModel.Composition.ExportFactory`1.CreateExport()
   at Microsoft.TeamFoundation.Controls.WPF.TeamExplorer.Framework.TeamExplorerSectionHost.Create()

The inner exception is the most interesting part:

System.NullReferenceException: Object reference not set to an instance of an object.
   at GitHub.VisualStudio.GitHubProviderDispatcher.GetService[T]() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.VisualStudio\Services\GitHubServiceProvider.cs:line 63
   at GitHub.Services.VSGitServices..ctor(IGitHubServiceProvider serviceProvider) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\src\GitHub.TeamFoundation.14\Services\VSGitServices.cs:line 40
@paulomorgado
Copy link

@paulomorgado paulomorgado commented May 10, 2017

Same issue as #987

@paladique
Copy link
Collaborator

@paladique paladique commented May 10, 2017

Hi @paulomorgado @AlexEyler, this is an known issue with VS2017 and initial install version of the extension failing when it is uploaded from the gallery (updating from 2.2.0.10 to 2.2.0.11). Did you install the extension during your initial install of VS2017?

@paladique
Copy link
Collaborator

@paladique paladique commented May 10, 2017

In addition to above, if you have the time, some of the folks at Microsoft that we communicate with asked if you users could pass along some additional logs in regards to this. The tool to do this can be found here. Feel free to send a message to support@github.com if you'd prefer not to share those logs in this issue.

@shana
Copy link
Collaborator

@shana shana commented May 10, 2017

Microsoft is currently tracking a problem where updating the extension from the gallery fails if the extension was initially installed via the Visual Studio installer. @paulomorgado If you could run the tool @paladique linked to and share the logs with us, we'll pass them on to MS for analysis.

If this exception is indeed caused by a problem with the VS updater, then a workaround is to uninstall the extension first and then install it fresh from the gallery. Let us know if that works for you, that would be valuable information for us to know.

@AlexEyler Do you have some idea of how many users might be affected by this from your telemetry numbers?

@AlexEyler
Copy link
Author

@AlexEyler AlexEyler commented May 10, 2017

@shana Looks like there've been 43 hits on 15.0.26430.4 (15.2).

@paulomorgado
Copy link

@paulomorgado paulomorgado commented May 10, 2017

Justa sent an e-mail to support@github.com mentioning issues 986 and 987. Please, acknowledge.

@grokys
Copy link
Contributor

@grokys grokys commented May 10, 2017

Thanks @paulomorgado, we received your email and passed it on to MS.

@grokys
Copy link
Contributor

@grokys grokys commented Dec 11, 2017

@AlexEyler is this still an issue?

@nemeth-tibor
Copy link

@nemeth-tibor nemeth-tibor commented Feb 20, 2018

It happens on VS2015 also and that is not a "fresh install".

@dibley1973
Copy link

@dibley1973 dibley1973 commented Apr 5, 2018

Like @nemeth-tibor - I also experience this on VS2015, with version 14.0.25431.01 Update 3. The Github extensions version is 2.4.3.1737. It was installed from the VS Extensions dialog.

What worked for me was to use a combination of these two pages.
#1394
#987

In essence what I did to resolve was:

  1. Shut down all instances of VS2015
  2. Uninstall the extension using VS2015 developer command prompt vsixinstaller /uninstall:c3d3dc68-c977-411f-b3e8-03b0dccf7dfc
  3. Use "Agent Ransack" (or another search tool) to find all folders with GitHub.VisualStudio.dll file in the extensions folder of the VS2015 installation.
  4. Delete those folders found by "Agent Ransack"
  5. Download the extension from the marketplace
  6. Reinstall the extension
  7. Restart VS2015 and hey presto issue is resolved.

I hope that may help others who experience this issue.

@meaghanlewis meaghanlewis moved this from High Priority to Needs Repro in BUGS May 29, 2018
@supermamon
Copy link

@supermamon supermamon commented Jun 26, 2018

I have VS 2015 v14.0.25431.01 Update 3.
Thanks @dibley1973 for those steps. In my case I got stuck at step 2 saying the VS2015 is using it even though it's already closed. I still proceeded the rest of the steps and it got resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
BUGS
  
Needs Repro
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants
You can’t perform that action at this time.