Libsecret unable to load because "failed when trying to create collection: 'No such secret collection at path: /'"
Submitted by Petter Gustafsson
Assigned to libsecret maintainer(s)
Link to original bug (#770893)
Description
Platform: Ubuntu 16.04
I have an issue where the API call service.load_collections_sync();
throws an exception "failed when trying to create collection: 'No such secret collection at path: /" and "failed when trying to find collection: 'No such secret item at path: /org/freedesktop/secrets/collection/login/1". My implementation worked without any issue for a long time but started to constantly prompt the user to create a new keyring because it couldn't load them and therefore though the keyring didn't exist.
One way to reproduce this has been to simply delete the login.keyring
from ~/.local/share/keyrings/
and restart. After this is done a call to service.load_collections_sync
will throw the exceptions above. Remove the login.keyring
again without restarting and everything will work. Sadly this will now trigger the error to happen on every restart until the keyring has been deleted.
Is there any way I can avoid having to use service.load_collections_sync()
and simply just try to lookup my own keyring without loading the others? That would at least let me work with the keyring and ignore this issue for now. Hopefully.
I have found that the issue is caused by this line in Libsecret: https://github.com/GNOME/libsecret/blob/master/libsecret/secret-item.c#L484
The called function is located here: https://github.com/GNOME/libsecret/blob/master/libsecret/secret-util.c#L423
So basically g_dbus_proxy_get_cached_property_names
is the cause of the error. My knowledge ends there sadly and I have no idea what's causing this mismatch / error.
Version: 0.18.x