Sourcetree crashes after switching to Remote tab
Asked by Luk?? Kratochv?l:

Hello,

when I switch to remote tab (remote repositories) then Sourcetree suddenly crashes. There are two log entries that occures when the crash happens. The entries are:

ERROR \[2020-07-28 07:33:45,605\] \[1\] \[SourceTree.Model.Repository\] \[Log\] - Repository: \[\] does not exist  
ERROR \[2020-07-28 07:33:56,343\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[Log\] - Failed to list teams for user \[olafvolafka\]

Does anyone have the same problem? Or does anyone have solution to this?


Answers:
author: Albert Chua
body: Manage to resolve this by refreshing my Access Tokens via Tools\\Options\\Authentication.

comments: author: sbloor
body: This helped me today.


author: Max
body: Also fixed it for me.


author: yurambo
body: Nice, this helped me too. Thank you Albert!


author: Fausto
body: Same here. Thank you. I clicked Edit and Ok. Got an authenthication OK messake. Resolved.


author: libin
body: Thanks. it saved my time also. Good catch... Albert


author: nasim_nosrati_geeksltd
body: Thanks! It worked for me too!


author: gteubl
body: I had the same issues and I saw in log that the problem was with an broken github account.

So I went to **C:\\Users\\{user}\\AppData\\Roaming\\Atlassian\\SourceTree** and I deleted the broken account at **accounts.json.**

Everything works like a charm!

Error on Event Viewer:

```
Application: SourceTree.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: SourceTree.Exceptions.RestApiException
at SourceTree.Host.GitHub.AbstractGitHubHost+<ListGroupingsForUser>d__39.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at SourceTree.ViewModel.Hosted.HostedProjectsViewModel+<RefreshGroupingList>d__95.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at SourceTree.ViewModel.Hosted.HostedProjectsViewModel+<<-ctor>b__47_8>d.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at SourceTree.App.Main()
```


author: Albert Chua
body: I have the same problem when clicking on the remote repositories with v3.3.9.

ERROR \[2020-08-06 00:41:23,040\] \[1\] \[SourceTree.Model.Repository\] \[Log\] - Repository: \[\] does not exist  
ERROR \[2020-08-06 00:41:47,398\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[Log\] - Failed to list teams for user \[xxxxx\]

Found this in the Event Viewer.

Application: SourceTree.exe  
Framework Version: v4.0.30319  
Description: The process was terminated due to an unhandled exception.  
Exception Info: SourceTree.Exceptions.ConnectivityException  
at SourceTree.Host.Bitbucket.BitbucketHost+\<ListGroupingsForUser\>d__35.MoveNext()  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)  
at SourceTree.ViewModel.Hosted.HostedProjectsViewModel+\<RefreshGroupingList\>d__95.MoveNext()  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)  
at SourceTree.ViewModel.Hosted.HostedProjectsViewModel+\<\<-ctor\>b__47_8\>d.MoveNext()  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)  
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)  
at System.Windows.Threading.DispatcherOperation.InvokeImpl()  
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)  
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)  
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)  
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)  
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)  
at System.Windows.Threading.DispatcherOperation.Invoke()  
at System.Windows.Threading.Dispatcher.ProcessQueue()  
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)  
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)  
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)  
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)  
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)  
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)  
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)  
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)  
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)  
at System.Windows.Application.RunDispatcher(System.Object)  
at System.Windows.Application.RunInternal(System.Windows.Window)  
at SourceTree.App.Main()

Faulting application name: SourceTree.exe, version: 3.3.9.3870, time stamp: 0x5ec58c28  
Faulting module name: KERNELBASE.dll, version: 10.0.18362.535, time stamp: 0x50cc8d5a  
Exception code: 0xe0434352  
Fault offset: 0x000000000003a839  
Faulting process id: 0x538c  
Faulting application start time: 0x01d66b473fb76e7a  
Faulting application path: C:\\Users\\albert\\AppData\\Local\\SourceTree\\app-3.3.9\\SourceTree.exe  
Faulting module path: C:\\WINDOWS\\System32\\KERNELBASE.dll  
Report Id: 72c6a408-79ae-4ec6-add3-a032ad9046dc  
Faulting package full name:  
Faulting package-relative application ID:

comments: author: Arnoud de Bekker
body: Also having this problem and same exception in the log. But i can pull the repository using an url, so there is no problem with authentication. I updated sourcetree afterwards and now I get an error saying: "endpoint removed for listing teams". Strange, since it worked perfectly last week


author: Adam Acree
body: Same issue here, getting the log message "ERROR \[2022-03-16 16:11:12,941\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[Log\] - Failed to list teams for user \[anacree\]"  

Any fix for this from Atlassian?


author: Kolham
body: Same problem here for first time today.


Tags: atl-gruland