Sourcetree 2.4.8 setup fails in windows10
Asked by fatma kayhan:

Hi,I am getting trouble setting up sourcetree.

In my first setup, the setup process begun.After a while I got some connection error (it was probably about the company firewalls) Anyways, I uninstalled the programme. Then I decided to reinstall it, but I am getting error everytime installing the programme.

The error:

Source tree has stopped working.A problem caused the program to stop working correctly. Please close the programme.

I tried everything in the dissuccions such as removing Atlassian and Sourcetree folders in the %appdata% folder

Added these statement in the source tree exe.config file

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

None of them has worked for me. Could you help me please ?


Answers:
author: fatma kayhan
body: Hello, the file is empty

In the event viewer , the logs for sourcetee are below

Faulting application name: SourceTree.exe, version: 2.4.8.0, time stamp: 0x5a5f7807  
Faulting module name: KERNELBASE.dll, version: 10.0.15063.726, time stamp: 0x1a9bbe0b  
Exception code: 0xe0434352  
Fault offset: 0x0000000000069d98  
Faulting process id: 0x9b4  
Faulting application start time: 0x01d3bfba3829399b  
Faulting application path: C:\\Users\\xxxxx\\AppData\\Local\\SourceTree\\app-2.4.8\\SourceTree.exe  
Faulting module path: C:\\Windows\\System32\\KERNELBASE.dll  
Report Id: 57547e42-5df4-4bbe-b47d-89abcaa386d9  
Faulting package full name:  
Faulting package-relative application ID:

Application: SourceTree.exe  
Framework Version: v4.0.30319  
Description: The process was terminated due to an unhandled exception.  
Exception Info: System.OutOfMemoryException  
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32, IntPtr)  
at System.Management.ManagementObjectCollection+ManagementObjectEnumerator.MoveNext()  
at SourceTree.Utils.WindowsOSHelper.GetWindowsVersion()  
at SourceTree.App..ctor()  
at SourceTree.App.Main()

(ps: I have 55gb free data )

C:\\Users\\xxxx\\AppData\\Local\\SquirrelTemp

SquirrelTemp log file

2018-03-19 22:53:34\> Program: Starting Squirrel Updater: --install .  
2018-03-19 22:53:34\> Program: Starting install, writing to C:\\Users\\TCFKAYHAN\\AppData\\Local\\SquirrelTemp  
2018-03-19 22:53:34\> Program: About to install to: C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree  
2018-03-19 22:53:34\> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree\\packages\\.betaId'.  
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)  
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)  
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)  
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)  
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)  
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)  
at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)  
at Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()  
2018-03-19 22:53:34\> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree\\packages\\RELEASES'.  
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)  
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)  
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)  
at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)  
at Squirrel.UpdateManager.CheckForUpdateImpl.\<CheckForUpdate\>d__2.MoveNext()  
2018-03-19 22:53:34\> CheckForUpdateImpl: Reading RELEASES file from C:\\Users\\TCFKAYHAN\\AppData\\Local\\SquirrelTemp  
2018-03-19 22:53:34\> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch  
2018-03-19 22:53:34\> ApplyReleasesImpl: Writing files to app directory: C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree\\app-2.4.8  
2018-03-19 22:53:35\> LogHost: Rigging execution stub for SourceTree_ExecutionStub.exe to C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree\\SourceTree.exe  
2018-03-19 22:53:35\> ApplyReleasesImpl: Squirrel Enabled Apps: \[C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree\\app-2.4.8\\SourceTree.exe\]  
2018-03-19 22:53:51\> ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\\Users\\TCFKAYHAN\\AppData\\Local\\SourceTree\\app-2.4.8\\SourceTree.exe: System.OperationCanceledException: The operation was canceled.  
at System.Threading.CancellationToken.ThrowOperationCanceledException()  
at Squirrel.Utility.\<\>c__DisplayClass11_0.\<InvokeProcessAsync\>b__0()  
at System.Threading.Tasks.Task.InnerInvoke()  
at System.Threading.Tasks.Task.Execute()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at Squirrel.Utility.\<InvokeProcessAsync\>d__11.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at Squirrel.UpdateManager.ApplyReleasesImpl.\<\>c__DisplayClass10_0.\<\<invokePostInstall\>b__0\>d.MoveNext()  
2018-03-19 22:53:52\> ApplyReleasesImpl: Starting fixPinnedExecutables  
2018-03-19 22:53:52\> ApplyReleasesImpl: Examining Pin: File Explorer.lnk  
2018-03-19 22:53:52\> ApplyReleasesImpl: Examining Pin: GDE 3.1.7 (Western European).lnk  
2018-03-19 22:53:52\> ApplyReleasesImpl: Examining Pin: Snipping Tool.lnk  
2018-03-19 22:53:52\> ApplyReleasesImpl: File 'C:\\Users\\TCFKAYHAN\\AppData\\Roaming\\Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar\\Snipping Tool.lnk' could not be converted into a valid ShellLink: System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)  
at Squirrel.Shell.ShellLink.IShellLinkW.Resolve(IntPtr hWnd, UInt32 fFlags)  
at Squirrel.Shell.ShellLink.Open(String linkFile, IntPtr hWnd, EShellLinkResolveFlags resolveFlags, UInt16 timeOut)  
at Squirrel.UpdateManager.ApplyReleasesImpl.\<fixPinnedExecutables\>b__11_0(FileInfo file)  
2018-03-19 22:53:52\> ApplyReleasesImpl: Fixing up tray icons  
2018-03-19 22:53:52\> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.  
at Squirrel.UpdateManager.ApplyReleasesImpl.\<unshimOurselves\>b__13_0(RegistryView view)  
2018-03-19 22:53:52\> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.  
at Squirrel.UpdateManager.ApplyReleasesImpl.\<unshimOurselves\>b__13_0(RegistryView view)  
2018-03-19 22:53:52\> ApplyReleasesImpl: cleanDeadVersions: for version 2.4.8  
2018-03-19 22:53:52\> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-2.4.8  
2018-03-19 22:54:14\> InstallHelperImpl: Couldn't write uninstall icon, don't care: System.Net.WebException: Unable to connect to the remote server ---\> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.113.192:15871  
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)  
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket\& socket, IPAddress\& address, ConnectSocketState state, IAsyncResult asyncResult, Exception\& exception)  
--- End of inner exception stack trace ---  
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)  
at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)  
at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)  
at Squirrel.UpdateManager.InstallHelperImpl.\<CreateUninstallerRegistryEntry\>d__5.MoveNext()

comments: author: Mike Corsaro
body: Seems like the WMI Service is not working quite right. Could you try either restarting the Windows Management Instrumentation service, or restarting your computer? If that doesn't work, [could you try the steps in this question](https://community.atlassian.com/t5/Sourcetree-questions/Re-Re-SourceTree-has-stopped-working/qaq-p/593008/comment-id/14880#M14880)? Thanks!


author: fatma kayhan
body: Hi, when I hit vmi there has been no error listed under General tab. Then I have done the same steps above again and then I've restarted the computer . I am sure that I 've restarted the computer before I opened a question in here. I am a bit confused but the problem has been solved :) Thanks!


author: Mike Corsaro
body: Hello! Could you see if a log was created? It should be in "C:\\Users\\USERNAME\\AppData\\Local\\Atlassian\\SourceTree\\sourcetree.log".

If that file does not exist, could you post the event-viewer log?

* Run Event Viewer
* Navigate to "Windows Logs \> Application" or "Windows Logs \> System" and try to find the log for Sourcetree, and post the details

Thanks!


Tags: windows