Gentoo package - dbus issue at startup

Asked by Jan

Hello,

I'm trying to get Polly (the current last released alpha) packaged for Gentoo.

I've got the packaging sorted out, but unfortunately the application bombs out with:

$ polly
Polly 0.93.4 (pre-alpha 3.4)
Copyright (C) 2011 Marcelo Hashimoto
cache path: /home/user/.cache/polly
config path: /home/user/.config/polly
data home: /home/user/.local/share/polly
initializing...
Traceback (most recent call last):
  File "/usr/bin/polly", line 303, in <module>
    account_manager = gui.twitter.account.Manager(NAME, config_path, config_path_lock, setting_factory, proxy_controller, font_scheme, identifier_factory, status_bar)
  File "/usr/lib64/python2.7/site-packages/polly/gui/twitter/account.py", line 486, in __init__
    subtoken_secret = keyring.get_password(self.name, subtoken)
  File "/usr/lib64/python2.7/site-packages/keyring/core.py", line 37, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/lib64/python2.7/site-packages/keyring/backend.py", line 206, in get_password
    _, session = service_iface.OpenSession("plain", "")
  File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "OpenSession" with signature "ss" on interface "org.freedesktop.Secret.Service" doesn't exist

Does this ring a bell to you?

Dbus installed is 1.4.20, dbus-python 1.0 .

Kind regards

Jan

Question information

Language:
English Edit question
Status:
Answered
For:
Polly Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Conscious User (conscioususer) said :
#1

This error refers to the absence of DBus methods that are supposed to be implemented by GNOME Keyring. Check if GNOME Keyring is running properly.

Revision history for this message
Jan (sub+launchpad) said :
#2

gnome keyring is running:

$ ps -efl|grep keyring
0 S user 6747 1 0 80 0 - 24498 - 12:25 ? 00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets

same issue with polly though.

Tried both keyring 2 and 3.

Revision history for this message
Conscious User (conscioususer) said :
#3

Strange, because it's the keyring responsibility to ensure that this DBus method exist.

Do other apps that use the keyring work? Empathy, for example?

Revision history for this message
Jan (sub+launchpad) said :
#4

I have none other than polly installed, unfortunately.

Revision history for this message
Conscious User (conscioususer) said :
#5

Can you install any temporarily? This will help to confirm where the problem is.

Revision history for this message
Dmitry Shachnev (mitya57) said :
#6

It seems that this is a regression in dbus-python 1.1, and it doesn't convert string to variant automatically (OpenSession signature is "sv").

Changing

    _, session = service_iface.OpenSession("plain", "")

to

    _, session = service_iface.OpenSession("plain", dbus.String("", variant_level=1))

in /usr/lib64/python2.7/site-packages/keyring/backend.py should help here.

I'll now try to file a bug about this for dbus-python.

Revision history for this message
Dmitry Shachnev (mitya57) said :
#7

I have reported a bug about this, see https://bugs.freedesktop.org/show_bug.cgi?id=50370.

Revision history for this message
Conscious User (conscioususer) said :
#8

Your trace in that upstream report shows you tried with Python3. Does the exact same problem happen with 2.7?

Revision history for this message
Dmitry Shachnev (mitya57) said :
#9

Yes, the same happens with Python 2.6 and 2.7.

I'm interested in this bug because I'm developer of lp:python-secretstorage and it brokes it, as well :(

Revision history for this message
Conscious User (conscioususer) said :
#10

Hmm, maybe you could consider moving to GDBus, that's what I'm doing for my Secret Service implementation I'm doing for 0.94.

Revision history for this message
Dmitry Shachnev (mitya57) said :
#11

> Hmm, maybe you could consider moving to GDBus, that's what I'm doing for my Secret Service implementation I'm doing for 0.94.

You could just use libsecret (http://git.gnome.org/browse/libsecret) GI bindings. In my case, I don't want to depend on PyGI (since I'm going to use my module in lp:retext, which is based on Qt).

Revision history for this message
Conscious User (conscioususer) said :
#12

I intend to move to libsecret when it becomes a standard part of GNOME or at least packaged by the major distros.

Revision history for this message
Nick Owen (nowen) said :
#13

I just ran into this again on linux mint 13. I'm running gnome-keyring 3.2.2-2ubuntu4 and polly 0.93.5-0~precise1.

Revision history for this message
Conscious User (conscioususer) said :
#14

Nick, as you can see from comments above, the issue is not on Polly.

Revision history for this message
Nick Owen (nowen) said :
#15

Oh, yes, sorry, should have been more clear - is there a working work-aournd until the libsecret move is complete?

Revision history for this message
Conscious User (conscioususer) said :
#16

From what I could see the problem is quite low level, I can't recommend much other than ensuring you have the latest gnome-keyring and python-keyring.

Revision history for this message
Nick Owen (nowen) said :
#17

hmm, certainly the latest in the mint repos. python-keyring 0.9.2-0ubuntu0.12.04.2, gnome-keyring 3.2.2-2ubuntu4.

Revision history for this message
Dmitry Shachnev (mitya57) said :
#18

I think this should be fixed with http://git.gnome.org/browse/gnome-keyring/commit/?id=5dccbe88eb, which is available in gnome-keyring >= 3.5.3 (the latest stable version is 3.6.2).

Can you help with this problem?

Provide an answer of your own, or ask Jan for more information if necessary.

To post a message you must log in.