Can not launch Sourcetree
Asked by wqybb:

ERROR \[2022-11-15 17:44:14,345\] \[1\] \[SourceTree.Model.Repository\] \[Log\] - Repository: \[\] does not exist  
ERROR \[2022-11-15 17:44:16,250\] \[1\] \[SourceTree.App\] \[Log\] - Failed to start  
System.Management.ManagementException: Invalid class  
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)  
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()  
at SourceTree.UI.Theme.Wpf.Utilities.NativeHelper.GetWindowsVersion()  
at SourceTree.UI.Theme.Wpf.Controls.PerMonitorDpiWindow.OnSourceInitialized(EventArgs e)  
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)  
at System.Windows.Window.ShowHelper(Object booleanBox)  
at SourceTree.AppRoot.\<OnStartup\>d__24.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()  
at SourceTree.App.\<OnStartup\>d__9.MoveNext()


Answers:
author: Mukesh Kumar
body: Please update to the latest Sourcetree version (3.4.11), It fixes the above issue.


author: Mukesh Kumar
body: Hi [@wqybb](/t5/user/viewprofilepage/user-id/5079369)

The issue has been already identified and fixed and will be available in the next coming release soon.


author: Mukesh Kumar
body: Hi [@wqybb](/t5/user/viewprofilepage/user-id/5079369)

**Please close the Sourcetree app (if running).**   
**Check the task manager, if Sourcetree exe is running, close that also.**

I would recommend you to uninstall and then reinstall Sourcetree.

1. **Uninstall Sourcetree using the Windows Uninstall program**.
2. **Delete the folders/files below before proceeding to the next step** :  
   Navigate to **C:\\Users\\\<UserName\>\\AppData\\Local** and delete all Sourcetree folders and files (if any)  
   Navigate to **C:\\Users\\\<UserName\>\\AppData\\Local\\Atlassian** and delete all Sourcetree folders and files (if any)  
   Navigate to **C:\\Users\\\<UserName\>\\AppData\\Roaming\\Atlassian** and delete all Sourcetree folders and files (if any)  
   Navigate to **C:\\Users\\\<UserName\>\\AppData\\Local\\SourceTree-Settings** and delete all Sourcetree folders and files (if any)
3. [Download Sourcetree for Windows](https://sourcetreeapp.com/) and install it.


author: wqybb
body: [@Mukesh Kumar](/t5/user/viewprofilepage/user-id/4883692) Thanks for your help. I reply by answer.


author: wqybb
body: **log**

*** ** * ** ***

(here are duplicated errors: Repository: \[\] does not exist)

ERROR \[2022-11-16 10:37:39,479\] \[1\] \[SourceTree.Model.Repository\] \[Log\] - Repository: \[\] does not exist  
ERROR \[2022-11-16 10:37:42,069\] \[1\] \[SourceTree.App\] \[Log\] - Failed to start  
System.Management.ManagementException: Invalid class  
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)  
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()  
at SourceTree.UI.Theme.Wpf.Utilities.NativeHelper.GetWindowsVersion()  
at SourceTree.UI.Theme.Wpf.Controls.PerMonitorDpiWindow.OnSourceInitialized(EventArgs e)  
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)  
at System.Windows.Window.ShowHelper(Object booleanBox)  
at SourceTree.AppRoot.\<OnStartup\>d__24.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()  
at SourceTree.App.\<OnStartup\>d__9.MoveNext()  
ERROR \[2022-11-16 10:37:42,248\] \[6\] \[SourceTree.Scheduler.SourceTreeDispatcher\] \[Log\] - Unable to get Dispatcher Application.Current is null  
ERROR \[2022-11-16 10:37:42,249\] \[6\] \[SourceTree.Scheduler.SourceTreeDispatcher\] \[Log\] - Unable to invoke async action \[System.Action\] dispatcher is null


author: wqybb
body: **Sourcetree version: 3.4.10**


author: wqybb
body: **Windows version: Windows 10 (19044.2251)**


author: wqybb
body: Why new reply or answer override the existing reply :( ?


author: wqybb
body: Actually this happened in an old version.

I uninstall the old one and install latest version, but can not get fixed.

comments: author: Mukesh Kumar
body: Hi [@wqybb](https://community.atlassian.com/t5/user/viewprofilepage/user-id/5079369)

<br />

Could you please share the **Windows version** , **Sourcetree version** information and the log file which can be found at below path.  
**C:\\Users\\\<UserName\>\\AppData\\Local\\Atlassian\\Sourcetree\\sourcetree.log**

This information will help us analyze and resolve your issue quickly.

Please upload the log file to Google drive or One drive and share the link.

Regards,

Mukesh


author: Mukesh Kumar
body: Hi [@wqybb](/t5/user/viewprofilepage/user-id/5079369)

<br />

Could you please share the **Windows version** , **Sourcetree version** information and the log file which can be found at below path.  
**C:\\Users\\\<UserName\>\\AppData\\Local\\Atlassian\\Sourcetree\\sourcetree.log**

Regards,

Mukesh

comments: author: wqybb
body: Oh... I reply several times, but it disappeared... Let me reply by answer.