SourceTree 2.3.1 Windows will not launch
Asked by StackOfRules:

A fresh install on Windows 10 (never installed before), and it will not launch. Tried all of the remedies in other threads to no avail. That includes:

1) Deleting the AppData\\Local\\Atlassian\\SoureTree.exe_Url... directory  
2) De-intalling and then...  
3) Deleting the AppData\\Local\\Atlassian and AppData\\Local\\SourceTree directories

The sourcetree log shows:

ERROR \[2017-09-21 12:29:08,609\] \[1\] \[SourceTree.App\] \[.ctor\] - finish EnsureSquirrelExecutionStubIsCopied  
ERROR \[2017-09-21 12:29:08,766\] \[1\] \[SourceTree.App\] \[OnStartup\] - Failed to start  
System.NullReferenceException: Object reference not set to an instance of an object.  
at SourceTree.Notifications.NotificationsManager.SetOwner(NotificationDialogWindow notificationWindow)  
at SourceTree.Notifications.NotificationsManager.ShowNotificationDialog\[T\](NotificationDialogWindow notificationWindow, Tuple\`2 customAction, VistaTaskDialogIcon icon)  
at SourceTree.Notifications.NotificationsManager.ShowNotificationDialog\[T\](String title, String message, Tuple\`2 customAction, String cancelLabel, String suppressionSetting, Action\`1 suppressionChangedAction, Object contentControl, String contentCommandLabel, Action contentAction)  
at SourceTree.Notifications.NotificationsManager.ShowNotificationDialogWithYesConfirmation(String title, String message, String details)  
at SourceTree.Configuration.WpfSpellCheckerPreFlightCheck.Run()  
at SourceTree.AppRoot.RunPreFlightChecks()  
at SourceTree.AppRoot.OnStartup(StartupEventArgs e)  
at SourceTree.App.OnStartup(StartupEventArgs e)

Any suggestions?


Answers:
author: Austin Mason
body: Have you tried navigating to the config file location (C:\\Users\\{USERNAME}\\AppData\\Local\\Atlassian\\SourceTree.exe_{RANDOM_GUID}\\2.3.1.0\\user.config) and then including the following line

```
<setting name="AutomaticallyCleanUpDictionaryFiles" serializeAs="String"> 
     <value>True</value> 
</setting>
```

comments: author: Donald Sealy
body: I was having the same problem as the OP, including the same stack trace and symptoms, and this answer solved my issues.  

Thanks Austin!


author: StackOfRules
body: You da man!!! Yes, adding that to the user.config worked! The installer kicked off on the next launch. Thank you!


author: agrant3d
body: This worked for me as well.


author: Anthony Attwood
body: This worked for me too.

Other 'solutions' like uninstalling/reinstalling, or deleting everything in \\AppData\\Local\\Atlassian\\SourceTree.exe{GUID} did not work.

Even the installer failed to start until I let it fail once then added this AutomaticallyCleanUpDictionaryFiles setting.


author: Gary Inglis
body: And me! Thanks for taking the time to post this.

Another morning wasted trying to figure this out myself!!!


author: gscalise-autovista
body: This worked for me too. Thanks!!!

Quite an annoying bug. I lost all my config reinstalling and reinstalling. :/


author: maxjanisse
body: Same with me. Tried all the other suggested solutions for fixing this behavior and nothing worked. Almost posted my own question until I found stumbled upon this thread.

Many thanks Austin!


author: chris_trinder
body: This worked for me! Thank you so much!! :-)


author: Korhan Turker
body: Thanks a lot! Worked for me too..


author: dickinre
body: I was having this problem too, tried all the other suggested solutions and this is the only thing that worked, thanks a lot!!


author: Anwar Javed
body: Thanks, It resolved my issue.


author: Connor Mahoney
body: Fixes the issue. THANK YOU.


author: Ren? Tuin
body: This fixed the problem thanks!


author: Herman Scheenen
body: Fixed the issue. Thanks!!!


author: skandarfessi
body: Worked for meee ! =D Thanks :))


author: rocker8942
body: Thanks, it worked. Just wonder why this simple fix is not applied to the product yet.


author: Chuck Lorence
body: Works, thanks! I agree with Joe Park, why isn't this line included within the user.config already?


author: Matt Anderson
body: This solved my issue as well. I had already switched to GitKraken on this machine so I could continue to work until I had time to look into this bug. I am disappointed this has been known about for so long, has caused so many issues but isn't included.


author: torg
body: thanks for the fix. Now I'm off to see what other horrors await me in 2.xxx land. Just switched from 1.9 and it has been. not pleasant.


author: Tom Tanner
body: 1/9 to 2.0 switch is a pain. Dear atlassian, please listen to your users  

Do not like the install and unpack every time you run

Do not like that you have put the program in user directories rather than in program files

Do not like that you apparently don't bother checking your install programs work

I need the program. But I hate what you've done to it.


author: Vlad Stryapko
body: Had the same issue, thanks.

The installation process is simply terrible and a big oversight at the company's part.


author: Ana Retamal
body: [@Tom Tanner](/t5/user/viewprofilepage/user-id/525286) if you'd like to be able to install Sourcetree in a different path, you might be interested in voting for [SRCTREEWIN-7168](https://jira.atlassian.com/browse/SRCTREEWIN-7168). You can also watch the ticket to be notified of future updates.

Regards!


author: minnsey
body: We have a fix for this being tested at the moment.

comments: author: ikbenkwik
body: Is this fix available yet? Sourcetree just stopped working one day. I uninstalled it and tried to re-install, but the installer just seems to stop after a while. Icon is placed in start window, but it can't be started.


author: StackOfRules
body: I tried this on a VM, and found that the install is never fully completing on the development platform. I have no idea why. It launches, shows the splash screen and then stops. The desktop icon is created, but the configuration dialog never appears.

comments: author: dieterrosch
body: I had the same issue - Austin Mason's solution above worked for me to fix this as well.


author: vasudevas

author: Iash44
body: worked for me

<https://jira.atlassian.com/browse/SRCTREEWIN-7898>


author: Ana Retamal
body: Hi everyone! As an update for this question, we have just started the progressive rollout of Sourcetree v2.3.5.0 which includes a fix for this issue. You should be prompted to upgrade sometime over the next 14 days or, alternatively, you can download the update directly from <https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.3.5.0.exe>

Have a nice day!

Ana

comments: author: aafi
body: ST was crashing for me on some specific repo (with two worktrees), no matter how many times I did reinstall it or the lines added to the config file.

Version 2.3.5.0 is working (so far).


author: aafi
body: Well, so far. I've clicked "Jump to" and it crashed!

FYI, 2.3.1 was working yesterday, so it's not strictly related to the worktrees.

It's working with other repos.


author: Patrick Little
body: This installer is also crashing before completing the setup


author: Hrvoje Muzina
body: Neither 2.3.1.0 nor 2.3.5.0 work.

However, I found a copy of 1.10.20.1 and that one works great.


author: claudiotorres
body: Renamed SourceTree, SourceTree-Settings and tmpAtlassian to tmpSourceTree, tmpSourceTree-Settings and tmpAtlassian on C:\\Users\\{user}\\AppData\\Local .  
In my case, worked.


author: Marc Villeneuve
body: Cleaning the windows temp dirs worked for me. Same issue before.

comments: author: StackOfRules
body: Tried that - no effect. Same results.

I even tried installing on a stock VM (where it succeeded), connecting to a repository, then copying the files to the problem system. It still generated the same error in the logs.

Checked the OS (no problems found), and tried other clients (i.e., GitKraken - all worked), but SourceTree has some issue that I can't pin down.


Tags: error

space

startup

windows