gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
12.81k stars 510 forks source link

Error "The reference did not exist" while listing branches #5144

Open krlvi opened 1 week ago

krlvi commented 1 week ago

Often times this happens on application startup. It has happened to be but also has been reported by users on discord: https://discord.com/channels/1060193121130000425/1073202153163857920/1293975411684016128 https://discord.com/channels/1060193121130000425/1206670506271707156/1295647968803815424

My hypothesis is that this is a race condition getting BranchListingDetails for branches while the app is fetching from the remote

NB: It appears that the error is harmless, but it can be quite noisy especially if there were many merged branches

image

anirudhsama commented 1 week ago

FYI it seems to happen on every app launch as well, even when there are no changes on remote. See recording: https://cln.sh/XTrhxKPj

Byron commented 6 days ago

As one would expect, this is a gitoxide error, but the prefix seems to be added in the frontend, judging from the find_reference() calls in the backend.

This makes me think that the hex-hash prefix is the name of the branch, but I am not sure.

I could look into this if I could get a hint on how to reproduce the issue.