You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I don't know much about golang, but one thing that might be related is that go-keyring checks whether err != nil, whereas wincred checks if cred != nil.
So I'd change the check from if err != nil to if cred == nil.
That wouldn't solve the underlying issue, but might convert the panic into a normal, handleable error.
Update:
I took a look at the logs, and, running on two different computers, I had two errors out of 290 runs (0.69%).
Each time it was executing a bunch of times successfully in sequence and then failed.
Ref danieljoos/wincred#5 (comment), the CreadRead API seems to be a bit flakey, do you think it might make sense to check if cred, err are nil, nil, and then try a second time, or would that be better handled at the calling application (Kopia in this case)?
Update 2:
4 failures in 439 runs (0.91%)
The text was updated successfully, but these errors were encountered:
ref kopia/kopia#732
I got a panic in Kopia, which uses go-keyring:
It crashes here in line 20:
go-keyring/keyring_windows.go
Lines 11 to 20 in 6905df4
Now, I don't know much about golang, but one thing that might be related is that go-keyring checks whether
err != nil
, whereas wincred checksif cred != nil
.In case
err
wasnil
andret
was0
here https://github.com/danieljoos/wincred/blob/78f93c1f8b99b0c2f6e7f3d2bdc4993cf87bddff/sys.go#L70, I believe that it would causenil, nil
to be returned.Another way
nil, nil
might be returned was ifcred
is null:https://github.com/danieljoos/wincred/blob/78f93c1f8b99b0c2f6e7f3d2bdc4993cf87bddff/conversion.go#L91-L94
See danieljoos/wincred#5 (comment).
So I'd change the check from
if err != nil
toif cred == nil
.That wouldn't solve the underlying issue, but might convert the panic into a normal, handleable error.
Update:
I took a look at the logs, and, running on two different computers, I had two errors out of 290 runs (0.69%).
Each time it was executing a bunch of times successfully in sequence and then failed.
Ref danieljoos/wincred#5 (comment), the CreadRead API seems to be a bit flakey, do you think it might make sense to check if
cred, err
arenil, nil
, and then try a second time, or would that be better handled at the calling application (Kopia in this case)?Update 2:
4 failures in 439 runs (0.91%)
The text was updated successfully, but these errors were encountered: