After updating windows 10 sourcetree does not start nor reinstall it
Asked by Ndahigeze:

After updating windows 10 sourcetree does not start nor reinstall it

When I try to start or reinstall it shows the sourcetree logo and then disappear, I tried restarting my pc and reinstalling it but no chance, Any help will be appreciated


Answers:
author: lucasbasilio
body: The same problem is happening to me...

Below I describe everything I tried to do.

After Windows update KB5007186, source tree stopped launching. The splashscreen was shown but the app was never openned nor listed in the task manager.

Tried running directly from C:\\Users\\\<username\>\\AppData\\Local\\SourceTree\\app-3.4.6\\SourceTree.exe but the result was the same: splashscreen was shown but the app was never openned nor listed in the task manager.

Also tried reinstalling SourceTree (SourceTreeSetup-3.4.6.exe) but the same was happening to the installer: the splashcreen was shown but the installer was never openned.

Uninstalled the app from the Control Panel (Programs and Features), and tried to install again. Same result: splashcreen was shown but the installer was never openned.

Removed the SourceTree and Atlassian folders from C:\\Users\\\<username\>\\AppData\\Local and tried to install again. The same happened, splashcreen was shown but the installer was never openned. But... going back to the C:\\Users\\\<username\>\\AppData\\Local folder I saw that the SourceTree folder was created again, with all files inside, including SourceTree.exe.

So I tried to run directly again from C:\\Users\\\<username\>\\AppData\\Local\\SourceTree\\app-3.4.6\\SourceTree.exe. Same result as above.

Then I found out that there is a folder with some logs: C:\\Users\\\<username\>\\AppData\\Local\\SquirrelTemp.

So here are the logs from SquirrelSetup.log, when I try to install (SourceTreeSetup-3.4.6.exe):

```
2021-11-17 16:18:51> Program: Starting Squirrel Updater: --install .
2021-11-17 16:18:51> Program: Starting install, writing to C:\Users\<username>\AppData\Local\SquirrelTemp
2021-11-17 16:18:51> Program: About to install to: C:\Users\<username>\AppData\Local\SourceTree
2021-11-17 16:18:51> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: N?o foi poss?vel localizar uma parte do caminho 'C:\Users\<username>\AppData\Local\SourceTree\packages\.betaId'.
em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
em 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)
em System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
em System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
em System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
em System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
em System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
em Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2021-11-17 16:18:51> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: N?o foi poss?vel localizar uma parte do caminho 'C:\Users\<username>\AppData\Local\SourceTree\packages\RELEASES'.
em System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
em 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)
em System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
em Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
em Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
2021-11-17 16:18:51> CheckForUpdateImpl: Reading RELEASES file from C:\Users\<username>\AppData\Local\SquirrelTemp
2021-11-17 16:18:51> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2021-11-17 16:18:51> ApplyReleasesImpl: Writing files to app directory: C:\Users\<username>\AppData\Local\SourceTree\app-3.4.6
2021-11-17 16:18:52> LogHost: Rigging execution stub for SourceTree_ExecutionStub.exe to C:\Users\<username>\AppData\Local\SourceTree\SourceTree.exe
2021-11-17 16:18:52> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\<username>\AppData\Local\SourceTree\app-3.4.6\SourceTree.exe]
2021-11-17 16:18:54> ApplyReleasesImpl: Starting fixPinnedExecutables
2021-11-17 16:18:54> ApplyReleasesImpl: Examining Pin: dbeaver.lnk
2021-11-17 16:18:54> ApplyReleasesImpl: Examining Pin: File Explorer.lnk
2021-11-17 16:18:54> ApplyReleasesImpl: Examining Pin: Google Chrome.lnk
2021-11-17 16:18:54> ApplyReleasesImpl: Fixing up tray icons
2021-11-17 16:18:54> ApplyReleasesImpl: cleanDeadVersions: for version 3.4.6
2021-11-17 16:18:54> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-3.4.6
```

Also found these errors in Windows Event Viewer (sorry for the Portuguese in the errors):

Event Viewer Error 1:

```
Aplicativo: SourceTree.exe
Vers?o do Framework: v4.0.30319
Descri??o: O processo foi terminado devido a uma exce??o sem tratamento.
Informa??es da Exce??o: System.Management.ManagementException
em System.Management.ManagementException.ThrowWithExtendedInfo(System.Management.ManagementStatus)
em System.Management.ManagementObjectCollection+ManagementObjectEnumerator.MoveNext()
em SourceTree.Utils.WindowsOSHelper.GetWindowsVersion()
em SourceTree.App..ctor()
em SourceTree.App.Main()
```

Event Viewer Error 2:

```
Nome do aplicativo com falha: SourceTree.exe, vers?o: 3.4.6.0, carimbo de data/hora: 0x611f4316
Nome do m?dulo com falha: KERNELBASE.dll, vers?o: 10.0.19041.1348, carimbo de data/hora: 0x76fcd692
C?digo de exce??o: 0xe0434352
Deslocamento da falha: 0x0000000000034f69
ID do processo com falha: 0x3b08
Hora de in?cio do aplicativo com falha: 0x01d7dbe9187f88fb
Caminho do aplicativo com falha: C:\Users\<username>\AppData\Local\SourceTree\app-3.4.6\SourceTree.exe
Caminho do m?dulo com falha: C:\WINDOWS\System32\KERNELBASE.dll
ID do Relat?rio: b2b2d89e-163f-40b3-ac8c-58e387fe76c5
Nome completo do pacote com falha: 
ID do aplicativo relativo ao pacote com falha:
```


author: bgsteiner
body: Also having the same problem. I have tried deleting the SourceTree and Atlassian folders in my appdata folders but still will not install or launch even directly from the previously installed exe