"Cannot set Owner property to a Window that has not been shown previously." whenever I try to open

I can't open SourceTree.  Everytime I try to run it nothing happens.  It shows up in the Task Manager for a few seconds before disappearing.  I get this error in the log every time:

ERROR [2017-08-01 13:26:01,530] [1] [SourceTree.App] [OnStartup] - Failed to start
System.InvalidOperationException: Cannot set Owner property to a Window that has not been shown previously.
at System.Windows.Window.set_Owner(Window value)
at SourceTree.Notifications.NotificationsManager.ShowNotificationDialog[T](NotificationDialogWindow notificationWindow, Tuple`2 customAction, VistaTaskDialogIcon icon)
at SourceTree.Repo.RepoHandlerGitOld.CheckLargeFilesInstalled(Boolean fixAndpromptUser)
at SourceTree.Repo.RepoHandlerGitOld.CheckIfGitLfsRequiredForRepo(String path, Boolean fixAndpromptUser)
at SourceTree.Repo.RepoHandlerGitOld.CheckConfigForRepo(String path, Boolean fixAndpromptUser)
at SourceTree.ViewModel.RepositoryTabContainerViewModel.AddNew(String path, Boolean wasCloned, RepoViewMode atView, String viewData)
at SourceTree.ViewModel.RepositoryTabContainerViewModel.AddOrActivate(String path, RepoViewMode atView, String viewData)
at SourceTree.ViewModel.RepositoryTabContainerViewModel.OpenRepoInTab(String path, RepoViewMode atView, String viewData)
at SourceTree.AppRoot.SingleInstanceOpenRepo(Boolean isFirstInstance, String targetRepo, RepoViewMode view, String data)
at SourceTree.AppRoot.ProcessArguments(Boolean isFirstInstance)
at SourceTree.AppRoot.DoWindowStartupTasks()
at SourceTree.ViewModel.MainWindowViewModel..ctor(IRepositoryTabContainerViewModel repositoryTabContainerViewModel, ICustomActionsManager customActionsManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher dispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IConfigurationManager configurationManager, IInstanceManager instanceManager, ISchedulerManager schedulerManager, IWebManager webManager, IRepositoryMonitorManager repositoryMonitorManager, ISshKeyManager sshKeyManager, INotificationsManager notificationsManager, IPreferencesManager preferencesManager)
at SourceTree.MainWindow..ctor(IRepositoryTabContainerViewModel repositoryTabContainerViewModel, ICustomActionsManager customActionsManager, IRepositoryManager repositoryManager, IAnalyticsDataManager analyticsDataManager, ITraceManager traceManager, IDispatcher dispatcher, IAccountManager accountManager, IFailureHandler failureHandler, IDvcsManager dvcsManager, IConfigurationManager configurationManager, IInstanceManager instanceManager, ISchedulerManager schedulerManager, IWebManager webManager, IRepositoryMonitorManager repositoryMonitorManager, IApplicationManager applicationManager, ISshKeyManager sshKeyManager, INotificationsManager notificationsManager, IBookmarkManager bookmarkManager, IPreferencesManager preferencesManager)
at SourceTree.AppRoot.OnStartup(StartupEventArgs e)
at SourceTree.App.OnStartup(StartupEventArgs e)

I've tried reinstalling, manually deleting the Atlassian AppData, and running as an administrator.  Same results.

What's going on here?

2 answers

1 accepted

If I run the installer after SourceTree has been installed, it loads up and works fine.

This widget could not be displayed.

Hi, looks like you're affected by the bug SRCTREEWIN-7373.

To solve this, download and install the latest Git-LFS version from https://git-lfs.github.com/. This will re-install Git-LFS and should ensure SourceTree can find it.

Let us know if this worked for you! 

Cheers,

Ana

I tried doing that and got the same result.  I tried reinstalling SourceTree and it loaded after installation, but I was unable to open it again.

I found something weird:

If I run the installer when SourceTree has already been installed, it loads up fine.  If I try to open it through a shortcut or running the application directly, it doesn't work.

I have the same weird behavior!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

874 views 2 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you