I have been using Sourcetree with two Gitlab repositories for several months without any issues. Recently, I wanted to add a third repository and every time I try to clone the new repository to Sourcetree, it crashes (Sourcetree locks up and I have to use the Task Manager to close it) When I paste the HTTPS address from GitLab, Sourcetree recognizes the repository as a Git repository. A status circle starts spinning next to Advanced options and then Sourcetree freezes up.
The version of Sourcetree that I have installed is 3.4.5. Within the windows event viewer, I have noticed two errors that pop up. My colleague has been able to close the repository on his computer using Sourcetree without any issues. Do you have any ideas why this is happening?
Thanks,
Jason Harrington
Hi,
I had the same error.
I solved it as follows:
- uninstall version 3.4.5
- delete folder c:\Users\USERNAME\AppData\Local\Atlassian
- instal version 3.4.4 https://product-downloads.atlassian.com/software/sourcetree/windows/ga/SourceTreeSetup-3.4.4.exe
Miro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you , fixed my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you don't want to revert to an older version of the software, see Aidan's answer below - making sure the repo is not empty worked for me as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Niubi 👍
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still happens in version 3.4.7. 😥
The bug is not fixed yet. (´・ω・`)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I confirm. its still crashing at this step in 3.4.7 and 3.4.4 works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Having the same issue with version 3.4.7. Found the following error information in Windows Event Viewer:
Application: SourceTree.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IndexOutOfRangeException
at SourceTree.Repo.RepoHandlerGitOld.GetDefaultBranch(System.String)
at SourceTree.ViewModel.CloneNewDialogViewModel+<>c__DisplayClass212_0.<RefreshRemoteBranches>b__1()
at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResult()
at SourceTree.ViewModel.CloneNewDialogViewModel+<RefreshRemoteBranches>d__212.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at SourceTree.ViewModel.CloneNewDialogViewModel+<CheckSource>d__211.MoveNext()
Exception Info: ReactiveUI.UnhandledErrorException
at ReactiveUI.RxApp+<>c__DisplayClass11_0.<.cctor>b__2()
at System.Reactive.Concurrency.Scheduler.Invoke(System.Reactive.Concurrency.IScheduler, System.Action)
at System.Reactive.Concurrency.DispatcherScheduler+<>c__DisplayClass12_0`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].<Schedule>b__0()
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()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For time being, I have installed version 3.4.4 and it's working fine. Thank you @Miro XY for the download link.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Installing 3.4.4 worked for me. In all instances where Sourcetree was crashing for me, the repository already contained several files. So Sourcetree isn't just crashing if you try to clone an empty repo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I encountered this exact same error just recently as well. I found that all I needed to do was actually commit something to the repository (e.g. a readme to the master branch) in order for Sourcetree not to crash when trying to clone. Initially the repository was brand new and empty, which I guess Sourcetree chokes on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your response Aidan. If I encounter this again, I will give it a try.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can confirm when opening a new repository without commits it crashes on version 3.4.6.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also confirmed that trying to clone an empty repository does crash 3.4.5 and 3.4.6.
Thanks for posting this solution!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, good day. I confirmed as said by Atanas Harapov, version 3.4.6 is still crashed when I tried to clone a repo w/o any branches & commits.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm a confused newbie. How can I commit to an empty repository when I am unable to clone it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good question, David John Brown.
There are a couple of ways of doing this.
If you created your repository in BitBucket, you can access it by signing in at https://bitbucket.org, find your repository, and create a file in it, for example, use the option to create a default .gitignore file. That one file is enough to get around this bug.
Otherwise, you might have to SSH into your server and use command-line git to commit a file, which is really not easy for a newbie. Which is ironic: the whole point of Sourcetree is to avoid the need to use command-line git!
Hope that helps. And I've no idea how to get the attention of the Atlassian team, but please, for pity's sake, if you're reading this: this silly issue is a huge impediment to people's getting going on Sourcetree. Please, please do the simple fix and stop confusing newbies!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Mark Jeffery. I got round it (after some head scratching) by using Git GUI, which I would prefer to have avoided given that I was following a Sourcetree tutorial!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Greetings David, as said by Mark Jeffery, when you create an empty repository BitBucket suggests making an "Initial Commit" with a README.md and/or with .gitignore file, both of them are in buttons in the repo creation form OR in the instructions when you finish the creation of. This is the common workaround I've found in this community. Regards and have a good day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, SETS_Insperion. I fell into this trap as I was trying to follow step-by-step a very good tutorial which I was using to try to get to grips with Sourcetree. I hated having to break off from the tutorial to workaround the issue. However I'm back on track now, thanks to the internet and, in particular, to this post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue using version 3.4.7. Fixed it creating an empty file on the remote repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here using 3.4.8.
Solved by cloning a brand new repo using Visual Studio, copying a file (any file) into the new location on-disk. I could then, successfully open SourceTree on the local copy and Commit/Push.
This has been an open issue since July 2021 - eight months. This should be something very easy to fix. What's up?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Committing a readme file still doesn't work in 3.4.9. Still crashing on clone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As suggested by Aiden:
Hey, Atlassian folk, could we get a fix for this? It's a strong candidate for a really easy fix:
Just crashing imposes real costs on users (we have to search the web for a solution, downgrade to an older version and/or work around the issue)... and crashing is not a good look!
Thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
still happing in 2022, version 3.4.9 it pretty sucks, could fix this
cloning repo from remote URL (amazon)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Exact remote and version for me too. Still have the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anyone got a solution on this i got a user he got the exactly same think and i do all the answer i see on the website and nothing work. I can do the cloning with the terminal but i cannot do it directly in Sourcetree. My version is the latest one 3.4.11 and I got Windows 11 at the latest version too. I really don't know why i cannot clone with Sourcetree can anyone help me please ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the old version 3.4.4 as mentioned, that should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I had the same issue with version 3.4.7. Upgrading to the latest one (3.4.9) solved the problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got the same problem with Sourcetree 3.4.7, did the actions that Miro XY suggested.
Deleted the folder and use version 3.4.4.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use the 3.4.4 and the first clone working but if i restart the computer Sourcetree never open again after.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, still the same problem in 3.4.7. It's starting to get embarrassing!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everybody, i had faced with same problem and i found there is a error when you make a git clone via console :
Cloning into 'src'...
warning: You appear to have cloned an empty repository.
So please check your repo on empty and if it's empty just add readme throw web ui
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is my Solution (as a git-Rookie):
Hope this helps someone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thx, this help me to resolve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This also worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'm having the same error in version 3.4.6.
I try to clone a repository, paste the URL, checks if it is a Git repository and them crashes the application.
I'm returning to version 3.4.4 as suggested by Miro XY in one of the answers in this thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.