GNOME Bugzilla – Bug 669318
NotConnected exception when calling remote Unlock
Last modified: 2012-02-04 21:02:21 UTC
Ubuntu with Gnome-keyring 2.92.92.is.2.31.91-0ubuntu4 and libgnome-keyring0 2.31.92-0ubuntu1 When I remotely call the Unlock method on org.freedesktop.secret.Service, I got this exception org.freedesktop.dbus.exceptions.NotConnected: Disconnected at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:501) at org.freedesktop.dbus.Error.getException(Unknown Source) at org.freedesktop.dbus.Error.throwException(Unknown Source) at org.freedesktop.dbus.RemoteInvocationHandler.executeRemoteMethod(Unknown Source) at org.freedesktop.dbus.RemoteInvocationHandler.invoke(Unknown Source) at $Proxy2.Unlock(Unknown Source) Here is an extract of my code: Item item = (Item) conn.getRemoteObject(BUS_NAME, objectPath, Item.class); try { secret = item.GetSecret(dbusSession); } catch (DBusExecutionException dbee) { if (dbee.getType().equals(org.freedesktop.Secret.Error.IsLocked.class.getCanonicalName())) { List<DBusInterface> itemsToUnlock = new ArrayList<DBusInterface>(1); itemsToUnlock.add(item); Pair<List<DBusInterface>,DBusInterface> usr = serv.Unlock(itemsToUnlock); } } If the password is not locked, the GetSecret works fine. If it is locked, the GetSecret throws a Error.IsLocked, and then the call to Unlock fails with above exception. I also tried to unlock all passwords in the collection at once (I pass the list of locked items returned by SearchItems) and got the same error.
Thanks for taking the time to report this bug. However, you are using version 2.91 which is too old and not supported anymore. GNOME developers are no longer working on that version, so unfortunately there will not be any bug fixes by GNOME developers for the version that you use. By upgrading to a newer version of GNOME you could receive bug fixes and new functionality. You may need to upgrade your Linux distribution to obtain a newer version of GNOME. Please feel free to reopen this bug if the problem still occurs with a newer version of GNOME (3.2 or 3.0), or feel free to file a bug report in the bug tracking system of your distribution if your distribution still supports this version.
schwarz, do you think gnome-keyring-daemon may be crashing? Check /var/log/auth.log for clues about that.