Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

TheSourceTree cannot be opened

Mikhail Khizhnyakov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 26, 2020

SourceTree cannot be opened (Windows 10). Only Splash screen is shown temporarily and then nothing. Can someone suggest a solution?

1 answer

0 votes
Daniel Ebers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 28, 2020

Hi Mikhail,

welcome to the Atlassian Community!

Have you had the chance to look into logs?
Probably an error is logged there pointing to a possible cause?

https://confluence.atlassian.com/sourcetreekb/sourcetree-logfile-location-675384748.html

Let us know if you found something out!

Regards,
Daniel

vhavard
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2023

I have got this error:

ERROR [2023-06-14 09:12:04,057] [1] [Sourcetree.Composition.VSMef.Net471.VSMefCompositionManager] [Log] - Unable to load MEF components
System.InvalidOperationException: La séquence ne contient aucun élément.
à System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
à Microsoft.VisualStudio.Composition.PartDiscovery.GetElementTypeFromMany(Type type)
à Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_ImportingSiteTypeWithoutCollection()
à Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_IsLazy()
à Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_LazyFactory()
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
à System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
à System.Linq.Buffer`1..ctor(IEnumerable`1 source)
à System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
à System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
à System.Linq.Buffer`1..ctor(IEnumerable`1 source)
à System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
à Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.CreateValue()
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.Create()
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
à Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
à System.Lazy`1.CreateValue()
à System.Lazy`1.LazyInitValue()
à Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.<>c__DisplayClass12_0.<UnwrapExport>b__1()
à System.ComponentModel.Composition.Primitives.Export.get_Value()
à System.ComponentModel.Composition.ReflectionModel.ImportingItem.Cast(Type type, Export export)
à System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.SetImport(ImportingItem item, Export[] exports)
à System.ComponentModel.Composition.Hosting.ImportEngine.PartManager.TrySetImport(ImportDefinition import, Export[] exports)
à System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition)
à System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part)
à System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports)
à System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(ComposablePart part)
à System.ComponentModel.Composition.Hosting.CompositionContainer.SatisfyImportsOnce(ComposablePart part)
à System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOnce(ICompositionService compositionService, Object attributedPart)
à Sourcetree.Composition.VSMef.Net471.VSMefCompositionManager.<Compose>d__5.MoveNext()

Mark Miller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 14, 2023

I have the same issue/error and SourceTree stopped starting up, even after a system reboot. Any suggestions?

 

ERROR [2023-06-14 21:20:43,978] [1] [Sourcetree.Composition.VSMef.Net48.VSMefCompositionManager] [Log] - Unable to load MEF components
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at Microsoft.VisualStudio.Composition.PartDiscovery.GetElementTypeFromMany(Type type)
at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_ImportingSiteTypeWithoutCollection()
at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_IsLazy()
at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_LazyFactory()
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
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()
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()
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 System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Microsoft.VisualStudio.Composition.NetFxAdapters.MefV1ExportProvider.<>c__DisplayClass12_0.<UnwrapExport>b__1()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ReflectionModel.ImportingItem.Cast(Type type, Export export)
at System.ComponentModel.Composition.ReflectionModel.ReflectionComposablePart.SetImport(ImportingItem item, Export[] exports)
at System.ComponentModel.Composition.Hosting.ImportEngine.PartManager.TrySetImport(ImportDefinition import, Export[] exports)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSubset(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(PartManager partManager, ComposablePart part, Boolean shouldTrackImports)
at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(ComposablePart part)
at System.ComponentModel.Composition.Hosting.CompositionContainer.SatisfyImportsOnce(ComposablePart part)
at System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOnce(ICompositionService compositionService, Object attributedPart)
at Sourcetree.Composition.VSMef.Net48.VSMefCompositionManager.<Compose>d__5.MoveNext()

Mark Miller
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2023

Uninstalling this Windows update got SourceTree to start properly again:

sourcetreefix.png

Atlassian - can you let us know when you get your software fixed so we can continue moving forward with Windows Updates?

vhavard
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 15, 2023

Removing a windows update seems not secure enough

From my side I removed a folder with the name

C:\Users\<username>\AppData\Local\Atlassian\SourceTree.exe_Url_r3nh1lfhtz1f3pkvf1uaijkehygo5m2p
(figures can be different)

and the sourcetree starts again

Like # people like this
Joao Gueifao
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2023

I confirm this worked on my Windows 11 as well. I had two folders with that naming. Deleted them both and now it works fine. Thank you. I didn't uninstall any Windows updates.

Like # people like this
Lars Maxfield
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 26, 2023

Thanks for the solution @vhavard — deleting that second folder worked for me as well.

Jon Thompson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 2, 2023

This did not work for me :(  My problem started around the same time.  The last time I opened SourceTree was over a month ago.  Today it won't open.

After deleting those folders the VS problems in the log have gone away but I still get a Failed to start with a different exception:

ERROR [2023-07-02 17:38:54,234] [1] [SourceTree.App] [Log] - Failed to start
System.NullReferenceException: Object reference not set to an instance of an object.
at SourceTree.Host.Bitbucket.BitbucketHost.GetCanonicalUri(IConfigurationManager configurationManager)
at SourceTree.Host.Bitbucket.BitbucketHost.get_CanonicalUri()
at SourceTree.Host.Bitbucket.BitbucketHost.get_CanonicalUrl()
at SourceTree.Accounts.HostedAccount.get_BaseUrl()
at SourceTree.Accounts.LegacyAccountPersistenceService.ConvertFromHostedAccounts(IEnumerable`1 hostedAccounts)
at SourceTree.Accounts.LegacyAccountPersistenceService.LoadAccounts()
at SourceTree.Accounts.AccountManager.LoadHostedAccounts()
at SourceTree.Accounts.AccountManager.get_HostedAccounts()
at SourceTree.Accounts.AccountManager.GetDefaultIdentityAccount()
at SourceTree.UI.ViewModel.Welcome.AtlassianAccountStageViewModel.Activated()
at SourceTree.UI.ViewModel.Welcome.WelcomeWizardWindowViewModel..ctor(IBookmarkManager bookmarkManager, IInteractionsManager interactionsManager, IWebManager webManager, IDispatcher dispatcher, IConfigurationManager configurationManager, IAccountManager accountManager, IRepositoryManager repositoryManager, IDvcsManager dvcsManager, IRepoProcessFactory repoProcessFactory, IDownloadManager downloadManager, IHostManager hostManager, IHostUiManager hostUiManager, INotificationsManager notificationsManager, IEnumerable`1 stages)
at SourceTree.UI.View.Welcome.WelcomeWizardWindow..ctor(IBookmarkManager bookmarkManager, IInteractionsManager interactionsManager, IWebManager webManager, IDispatcher sourceTreeDispatcher, IConfigurationManager configurationManager, IAccountManager accountManager, IRepositoryManager repositoryManager, IDvcsManager dvcsManager, IRepoProcessFactory repoProcessFactory, IDownloadManager downloadManager, IHostManager hostManager, IHostUiManager hostUiManager, INotificationsManager notificationsManager, IEnumerable`1 stages)
at SourceTree.UI.WelcomeWizardManager.Run()
at SourceTree.UI.OnboardingManager.Run()
at SourceTree.AppRoot.Onboard()
at SourceTree.AppRoot.OnboardIfRequired()
at SourceTree.AppRoot.<OnStartup>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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at SourceTree.App.<OnStartup>d__9.MoveNext()
Joao Gueifao
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2023

@Jon Thompson today I got the same issue again (I hadn't checked the logs to see if the root cause was the same as yours though). 

While I was trying to perform the same operation suggested by @vhavard above, SourceTree would still not open. Then I restarted Windows, and then it opened fine!

Jon Thompson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 2, 2023

Unfortunately I never solved this.  I gave up and migrated to GitHub.  They have a tool which can import from BitBucket.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events