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

SourceTree failed to start

Keith Olson September 19, 2017

Please help!

On Windows 10, SourceTree wasn't opening anymore, so I removed the software and deleted the Atlassian folder in my users/AppData/Local folder, then downloaded and reinstalled SourceTree v.2.3.1.0. Same problem.

I found the sourcetree.log file, and this is what it contains:

ERROR [2017-09-19 09:28:53,181] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-09-19 09:28:53,306] [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)

10 answers

2 accepted

22 votes
Answer accepted
Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2017

Hello! This is a known issue. Please navigate to the config file location (C:\Users\{USERNAME}\AppData\Local\Atlassian\SourceTree.exe_{RANDOM_GUID}\2.3.1.0\user.config) and find the following line:

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

Make sure that value is set to True

Paul Cowan September 20, 2017

I had to add this setting, as it was not present probably due to reinstalling to try to fix the problem.  But adding the setting fixes it.  The installer was not even running without this setting.

Keith Olson September 21, 2017

That did it! I'm glad it was a simple as that. 

Thanks much!

MarconiM September 21, 2017

Thank god! That was it. Worked instantly after adding the setting and running sourcetree again.

Cameron Haddad September 21, 2017

This worked.

Can you had this into the installer and make a new version ASAP.   Its really frustrating as there is not UI on the installer (really bad idea) or the application with this error.   And lots of threads with installer/load issues.   Took me a while to find this.

Frank Frank September 25, 2017

No such line. Plus, I don't really like this way of doing things. Basically, you are asking users to delete something that they don't want to.

edozier September 26, 2017

Frank,

 

You don't delete it, you add it.

Ralph Trickey October 1, 2017

That worked, although I now need to re-add all my projects since I followed other advice on this forum and deleted the apps folder.

I'm disappointed,  it's over a week since it was reported and a fix found, I would have expected a new installer to have already been out that fixed it.

FarshanAhamed October 3, 2017

Thanks, I've been searching for this. And i got fixed.

Niklas Rosencrantz October 3, 2017

Thanks Mike but I can't believe that a mature software has such major problems that it doesn't even start.

Why can't they write working code?

Mario Schwarz October 4, 2017

Took me quite a while to find this after sourcetree just stopped working. Finally fixed it thanks.

This is not easy enough to find for a known issue.

Jay Renz Morgado October 10, 2017

Whoa what a fix. I hope they can have a real fix for these. I almost reinstalled my windows vm. 

Robert Prom October 16, 2017

Ran the installer (v2.3.1.0) on Win10 and it seems nothing happened, however, the app was actually installed. When trying to run the app I'd see the sourcetree.exe process for about 5 seconds and then it'd go away. Once I added that setting to the user.config the app worked fine. No reinstall was needed.

Ivan Sager October 22, 2017

Did the job. Thanks!

Mike Purrington October 25, 2017

So, this worked for me.  Downloaded a brand new installer this morning and it is STILL not fixed in the installer.  I blew away an hour of my time trying to get this thing to load.  

I work on a small software team and we frequently have some QC issues like this as well.  THIS makes me feel a lot better about my own product and QC processes!

matt raffel October 30, 2017

this did not work for me.  when I found the user.config file, I found it was corrupt.  parsely formatted XML with jibberish at the end.   No idea how it got that way.  I copied user.config from a previous folder and then I was able to open SourceTree 2.3.1

Thiếu tá Phạm Xuân Bách June 22, 2023

This didn't work.

1 vote
Answer accepted
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 19, 2017

Hi everyone! As an update, we've started the progressive rollout of Sourcetree v2.3.5.0 which includes a fix for this issue. You should be prompted to upgrade at some point over the next 14 days or, alternatively, you can download it directly from https://downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-2.3.5.0.exe

Cheers :)

Ana

matt raffel October 30, 2017

Ana

Can you explain why SourceTree installs in the user appdata folder rather than program files folder like most windows apps?  I find this very strange.

1 vote
Frank Frank September 25, 2017

// SourceTree.Notifications.NotificationsManager
private static void SetOwner(NotificationDialogWindow notificationWindow)
{
    Window currentWindow = WindowsOSHelper.GetCurrentWindow();
    Window window = (currentWindow == notificationWindow) ? null : currentWindow;
    if (window != null && window.IsVisible)
    {
        notificationWindow.Owner = window;
        return;
    }
    NotificationsManager.Logger.Error(string.Format("Unable to set owner as parent {0} is not visible", window.Name)); // <- Problem's here. If windows == null. It's not going to work.
}

Nicolas Frelat September 26, 2017

Same bug for me. No workaround works.

0 votes
Ian Daintith February 14, 2018

Amazing. I lost 2 hours today with this. 

0 votes
Andy Luff November 8, 2017

None of the above solutions worked for me.  Tried a clean install of 2.3.5 after deleting all %localappdata%.  Same error... [ERROR [2017-11-08 15:53:23,111] [1] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied]

Wasted too many hours on this, now moving to alternative product.

colinrobertbrooks March 19, 2018

I'm in the same doom loop. What did you switch to?

hitokun-s July 12, 2018

I'm in the same situation. I tried many products, but nothing was better than Sourcetree. I hope SourceTree dev team investigate this issue seriously...

0 votes
M October 29, 2017

OMG! Can you just fix this problem in new version?

For searching solution I'm lost all settings...

0 votes
Philippe RIVAT October 16, 2017

Merci beaucoup.
Arrêtez de pleurer alors que vous ne payez même pas le logiciel !!!

0 votes
coder_trader October 8, 2017

It works for me, I added to the file 

<setting name="AutomaticallyCleanUpDictionaryFiles" serializeAs="String"> 
<value>True</value>
</setting>
0 votes
Dan Haywood October 1, 2017

None of the above worked for me, but the solution on this thread https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-will-no-longer-start/qaq-p/642054#U648488  did work.

Markus Weser October 11, 2017

Thanks! Adding this setting solved for me (Win 10 16299.15, SourceTree 2.3.1.0)!

0 votes
Frank Frank September 26, 2017

Hi @Nicolas Frelat,

If you do have the same call stack in you log file, here's the other way to fix the issue:

1. Open RegEdit. Navigate to:

2. Computer\HKEY_CURRENT_USER\Software\Microsoft\Spelling\Dictionaries

3. Double click the "_Global_"

4. Check each file and see if they exists.

5. Remove the one that's not there.

6. Hit OK.

7. Start your SourceTree.

There's another solution provided by @Mike Corsaro might also be working. However:

1. You might be scared, as I was, by both the popup message or the setting name "Remove the dictionary files" or "Cleanup dictionary files". In fact, it's not going to remove any file but the path of the non-existing file in the registry if you read the source code.

2. You might find that there is no such "AutomaticallyCleanUpDictionaryFiles" in the user.config file on your local machine. And you entered the panic mode because the file is huge and you don't know where would be the right spot to put it in as I did.

Cheers,

Frank

P.S.:

Not sure why they think the missing files will causing the slowness. Maybe it's about the network issue. However, I don't really like the way it is now which confuses users a lot. It should:

1. Measure the time of loading the dictionary files and ask users if they like to not loading these files if it's too slow. Trying to load a missing file on local machine should not be taking too long, especially compared with the time asking user to read the popup and think about why I have to do that. Or,

2. Lazy loading the files asynchronously. It should not be affecting the core feature even if some of the files do not finished loading on time. Or,

3. At least fix the message to not scare the user but tell the truth. It's not cleaning up the files. The files are not corrupted. It's just prevent check and loading the non-existing files only.

Nicolas Frelat September 29, 2017

Hi,

The registry edition tip did the job! After the change, I had some more glitches but now it works.

Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events