gitbutler
gitbutler copied to clipboard
Bug: failed load remote branches
I keep getting this for my main gitlab repo:
I've used the Test credentials
button in the project settings and everything passes. Currently on version 0.10.24
. Mac M2 Pro on Sonoma 14.4.
Would you be able to take a quick look in the logs to see if you find any errors? This toast is a result of a failed call to the list_remote_branches
tauri command.
How to find your log files: https://docs.gitbutler.com/development/debugging
I think I've tracked down the relevant log:
2024-03-13T00:54:53.454395Z ERROR list_remote_branches: gitbutler-app/src/virtual_branches/errors.rs:809: list remote branches error error=failed to convert branches
Caused by:
not found: the reference 'refs/remotes/origin/HEAD' cannot be peeled - Cannot resolve reference; class=Invalid (3); code=NotFound (-3) [3mproject_id[0m[2m=[0m"f33b1530-8095-4f45-886d-54b6beac5c16"
2024-03-13T00:54:53.454410Z INFO list_remote_branches: gitbutler-app/src/virtual_branches/commands.rs:539: close time.busy=152ms time.idle=22.8µs [3mproject_id[0m[2m=[0m"f33b1530-8095-4f45-886d-54b6beac5c16"
2024-03-13T00:54:53.456310Z ERROR list_remote_branches: gitbutler-app/src/virtual_branches/errors.rs:809: list remote branches error error=failed to convert branches
Caused by:
not found: the reference 'refs/remotes/origin/HEAD' cannot be peeled - Cannot resolve reference; class=Invalid (3); code=NotFound (-3) [3mproject_id[0m[2m=[0m"f33b1530-8095-4f45-886d-54b6beac5c16"
I was able to resolve locally by deleting .git/refs/remotes/origin/HEAD
. I noticed that the contents of the file had it pointing to the wrong default branch name (we changed from 'master' to 'main').
However, this change was well before we started using GitButler on the repository and GitButler had previously worked as expected until a few days ago. I'm not certain what would have triggered this.
I did some manual branch changing, pushing, and pulling briefly when I had a few active branches that I was having trouble with in GitButler, so maybe I did something there?
I had exactly the same issue, with the same cause (mine was also pointing 'develop' which he had since changed to 'main')
I have submitted a PR with what should be a fix for this: #3584.