Secret store seems to be returning null occasionally
This might be what is causing certain GitBut/Hub/Lab integrations to spontaneously disapear
I loose the secrets about every 4th start of gitbutler. I am on linux and have the gnome secret store backend. It would be nice if gitbutler wasn’t wiping the config when it can’t get the secret and would retry later or on the next start.
Maybe what's happening here is that the backend doesn't get a secret even if it's present. Then the UI gets nothing, but sets "nothing" or clears the existing value 'by accident'.
The backend does seem to support properly indicating that a secret isn't there.
https://github.com/gitbutlerapp/gitbutler/blob/0bbf6f5ffa936fd808e1969ed3442682c3e6426e/crates/gitbutler-secret/src/secret.rs#L38
Of course, if the backend implementation would return empty strings as secret, the backend would rightfully think a secret it present - it doesn't look at the value at all right now.
To fix this, it would be useful to know what kind of values the UI is seeing - then it should be possible to know where it can be fixed.
On unix for such libraries sometimes one has to select a backend per environment variable. I did not see that in keyring-rs. So I installed keyring-cli from keyring-rs and it adds the secrets to gnome-keyring.
So the default is gnome-keyring. But, at the moment gitbutler does not add it the gnome-keyring. I think I have seen it in the gnome-keyring in past, but I cannot confirm that 100%. What is interesting, the secret sometimes survives a reboot. That is all I have at the moment, for more I need to start reading code an compiling things.. maybe later..