Sourcetree install fails (Update stopped working)
Asked by Jordy van der Eem:

After a previous install of Sourcetree just vanished from the computer (not findable in control panel, program files or appdata) any attempt to install a new version fails.

The sourcetree logo pops up and after that I get an error saying "Update has stopped working" after which I get a popup stating that the installation has failed giving me the option to check out the setup log (I've added it down below).

I've cleared every findable bit of sourcetree of my pc and even resorted to ccleaner to clean out the rest. Nothing, still the same error when running the setup.

Older versions sometimes will install but will freeze up on launch.

The OS I'm trying to run Sourcetree on is Windows 7 64 bit.

```
2017-07-19 08:59:05> Program: Starting Squirrel Updater: --install .
2017-07-19 08:59:06> Program: Starting install, writing to C:\Users\Eigenaar\AppData\Local\SquirrelTemp
2017-07-19 08:59:07> Program: About to install to: C:\Users\Eigenaar\AppData\Local\SourceTree
2017-07-19 08:59:08> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\Eigenaar\AppData\Local\SourceTree\packages\.betaId niet vinden.
 bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 bij 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)
 bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
 bij System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
 bij System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
 bij System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
 bij System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
 bij Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2017-07-19 08:59:08> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\Eigenaar\AppData\Local\SourceTree\packages\RELEASES niet vinden.
 bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 bij 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)
 bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
 bij Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
 bij Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
2017-07-19 08:59:08> CheckForUpdateImpl: Reading RELEASES file from C:\Users\Eigenaar\AppData\Local\SquirrelTemp
2017-07-19 08:59:08> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2017-07-19 08:59:08> ApplyReleasesImpl: Writing files to app directory: C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.1.2.5
2017-07-19 08:59:14> ApplyReleasesImpl: Squirrel Enabled Apps: []
2017-07-19 08:59:15> ApplyReleasesImpl: No apps are marked as Squirrel-aware! Going to run them all
2017-07-19 08:59:15> ApplyReleasesImpl: About to create shortcuts for SourceTree.exe, rootAppDir C:\Users\Eigenaar\AppData\Local\SourceTree
2017-07-19 08:59:17> ApplyReleasesImpl: Creating shortcut for SourceTree.exe => C:\Users\Eigenaar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Atlassian\SourceTree.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: About to save shortcut: C:\Users\Eigenaar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Atlassian\SourceTree.lnk (target C:\Users\Eigenaar\AppData\Local\SourceTree\Update.exe, workingDir C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.1.2.5, args --processStart "SourceTree.exe")
2017-07-19 08:59:18> ApplyReleasesImpl: Creating shortcut for SourceTree.exe => D:\Mijn bestanden\Mijn bureaublad\SourceTree.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: About to save shortcut: D:\Mijn bestanden\Mijn bureaublad\SourceTree.lnk (target C:\Users\Eigenaar\AppData\Local\SourceTree\Update.exe, workingDir C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.1.2.5, args --processStart "SourceTree.exe")
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Beyond Compare 4.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Fiddler 4.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: FileZilla Client.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Google Chrome.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Mozilla Firefox.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: MySQL Workbench 6.3 CE.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Notepad++.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: SourceTree_1.9.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Sublime Text 3.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: WampServer64.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Windows Explorer.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Starting fixPinnedExecutables
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Beyond Compare 4.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Fiddler 4.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: FileZilla Client.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Google Chrome.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Mozilla Firefox.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: MySQL Workbench 6.3 CE.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Notepad++.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: SourceTree_1.9.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Sublime Text 3.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: WampServer64.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Examining Pin: Windows Explorer.lnk
2017-07-19 08:59:18> ApplyReleasesImpl: Fixing up tray icons
2017-07-19 08:59:18> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
 bij Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-07-19 08:59:18> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
 bij Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-07-19 08:59:18> ApplyReleasesImpl: cleanDeadVersions: for version 2.1.2.5
2017-07-19 08:59:18> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-2.1.2.5
2017-09-11 09:32:25> Program: Starting Squirrel Updater: --install .
2017-09-11 09:32:25> Program: Starting install, writing to C:\Users\Eigenaar\AppData\Local\SquirrelTemp
2017-09-11 09:32:25> Program: About to install to: C:\Users\Eigenaar\AppData\Local\SourceTree
2017-09-11 09:32:25> Program: Install path C:\Users\Eigenaar\AppData\Local\SourceTree already exists, burning it to the ground
2017-09-11 09:32:27> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\Eigenaar\AppData\Local\SourceTree\packages\.betaId niet vinden.
 bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 bij 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)
 bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
 bij System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
 bij System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
 bij System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
 bij System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
 bij Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2017-09-11 09:32:27> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\Eigenaar\AppData\Local\SourceTree\packages\RELEASES niet vinden.
 bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 bij 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)
 bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
 bij Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
 bij Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
2017-09-11 09:32:27> CheckForUpdateImpl: Reading RELEASES file from C:\Users\Eigenaar\AppData\Local\SquirrelTemp
2017-09-11 09:32:27> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2017-09-11 09:32:28> ApplyReleasesImpl: Writing files to app directory: C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.1.11
2017-09-11 09:32:33> LogHost: Rigging execution stub for SourceTree_ExecutionStub.exe to C:\Users\Eigenaar\AppData\Local\SourceTree\SourceTree.exe
2017-09-11 09:32:37> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.1.11\SourceTree.exe]
2017-09-11 09:32:48> ApplyReleasesImpl: Starting fixPinnedExecutables
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Beyond Compare 4.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Fiddler 4.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: FileZilla Client.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Google Chrome.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Mozilla Firefox.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: MySQL Workbench 6.3 CE.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Notepad++.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Snipping Tool.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: File 'C:\Users\Eigenaar\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Snipping Tool.lnk' could not be converted into a valid ShellLink: System.IO.FileNotFoundException: Het systeem kan het opgegeven bestand niet vinden. (Uitzondering van HRESULT: 0x80070002)
 bij Squirrel.Shell.ShellLink.IShellLinkW.Resolve(IntPtr hWnd, UInt32 fFlags)
 bij Squirrel.Shell.ShellLink.Open(String linkFile, IntPtr hWnd, EShellLinkResolveFlags resolveFlags, UInt16 timeOut)
 bij Squirrel.UpdateManager.ApplyReleasesImpl.<fixPinnedExecutables>b__11_0(FileInfo file)
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: SourceTree_1.9.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Sublime Text 3.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: WampServer64.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Examining Pin: Windows Explorer.lnk
2017-09-11 09:32:48> ApplyReleasesImpl: Fixing up tray icons
2017-09-11 09:32:49> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
 bij Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-09-11 09:32:49> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld.
 bij Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-09-11 09:32:49> ApplyReleasesImpl: cleanDeadVersions: for version 2.1.11
2017-09-11 09:32:49> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-2.1.11
2018-06-26 13:38:11> Program: Starting Squirrel Updater: --install .
2018-06-26 13:38:11> Program: Starting install, writing to C:\Users\Eigenaar\AppData\Local\SquirrelTemp
2018-06-26 13:38:11> Program: About to install to: C:\Users\Eigenaar\AppData\Local\SourceTree
2018-06-26 13:38:11> Program: Install path C:\Users\Eigenaar\AppData\Local\SourceTree already exists, burning it to the ground
2018-06-26 13:38:12> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\Eigenaar\AppData\Local\SourceTree\packages\.betaId niet vinden.
 bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 bij 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)
 bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
 bij System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
 bij System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
 bij System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
 bij System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
 bij Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2018-06-26 13:38:12> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\Eigenaar\AppData\Local\SourceTree\packages\RELEASES niet vinden.
 bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 bij 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)
 bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
 bij Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
 bij Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
2018-06-26 13:38:12> CheckForUpdateImpl: Reading RELEASES file from C:\Users\Eigenaar\AppData\Local\SquirrelTemp
2018-06-26 13:38:12> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2018-06-26 13:38:12> ApplyReleasesImpl: Writing files to app directory: C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.0.20.1
2018-06-26 13:38:17> ApplyReleasesImpl: Squirrel Enabled Apps: []
2018-06-26 13:38:17> ApplyReleasesImpl: No apps are marked as Squirrel-aware! Going to run them all
2018-06-26 13:38:17> ApplyReleasesImpl: About to create shortcuts for SourceTree.exe, rootAppDir C:\Users\Eigenaar\AppData\Local\SourceTree
2018-06-26 13:38:17> ApplyReleasesImpl: Creating shortcut for SourceTree.exe => C:\Users\Eigenaar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Atlassian\SourceTree.lnk
2018-06-26 13:38:17> ApplyReleasesImpl: About to save shortcut: C:\Users\Eigenaar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Atlassian\SourceTree.lnk (target C:\Users\Eigenaar\AppData\Local\SourceTree\Update.exe, workingDir C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.0.20.1, args --processStart "SourceTree.exe")
2018-06-26 13:38:17> ApplyReleasesImpl: Creating shortcut for SourceTree.exe => D:\Mijn bestanden\Mijn bureaublad\SourceTree.lnk
2018-06-26 13:38:17> ApplyReleasesImpl: About to save shortcut: D:\Mijn bestanden\Mijn bureaublad\SourceTree.lnk (target C:\Users\Eigenaar\AppData\Local\SourceTree\Update.exe, workingDir C:\Users\Eigenaar\AppData\Local\SourceTree\app-2.0.20.1, arg
```


Answers:
author: minnsey
body: Hi  

Looking at the log, there are a lot of warnings and errors that are really warnings.   

Can you check to see if there is anything in the %localappdata%/Sourcetree folder?  

There should be a %localappdata%/Sourcetree/Sourcetree.exe this is a launcher app and in %localappdata%/Sourcetree/app-2.6.9 the actuall installation itself and the real sourcetree.exe.  

If the Sourcetree.exe exists and you try and run it directly does it work? If not is there anything relvant in the Event Viewer or in %locaappdata%/Atlassian/Sourcetree/sourcetree.log?

comments: author: Jordy van der Eem
body: Running it directly from the %localappdata%/Sourcetree/app-2.6.9 sourcetree.exe I get an "Sourcetree stopped working" error. But we're one step further. No failed setup log sadly. I found the sourcetree.log to be empty.

The event viewer however did display an error concerning sourcetree (translated from Dutch):

```
Name of application with error: SourceTree.exe, version: 2.6.9.0, timestamp: 0x5b28a3d2
Name of module with error: KERNELBASE.dll, version: 6.1.7601.23392, timestamp: 0x56eb3604
Exception code: 0xc06d007e
Erroroffset: 0x000000000001a06d
Id of process with error: 0x1d08
Starting time of application with error: 0x01d412c2f960286f
Path to application with error: %localappdata%\SourceTree\app-2.6.9\SourceTree.exe
Path to module with error: C:\Windows\system32\KERNELBASE.dll
```

I'm sorry if the translated texts look a bit google translate-ish. It's not, but I don't have a system to copy the correct texts from.