Polly wants me to authorize at every launch

Bug #1154870 reported by Heimen Stoffels
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Polly
Fix Committed
Undecided
Unassigned

Bug Description

Since I've upgraded Polly from 0.93.5 to 0.93.6 it want me to authorize and forgets Its settings every time I launch Polly. I've reinstalled 0.93.6 and made sure that every little thing was removed beforehand so it's a clean install.

I've encountered it on Ubuntu 13.04

Hope this gets fixed soon. If you need output or anything, just let me know.

description: updated
description: updated
Revision history for this message
Conscious User (conscioususer) wrote :

What do you see when you start Polly from the terminal?

Revision history for this message
Heimen Stoffels (vistaus) wrote :

This is what I see (from the launching to the authorizing et all):

vistausss@vistaus-mbp:~$ polly
Polly 0.93.6 (pre-alpha 3.6)
Copyright (C) 2011 Marcelo Hashimoto
cache path: /home/vistausss/.cache/polly
config path: /home/vistausss/.config/polly
data home: /home/vistausss/.local/share/polly
initializing.../usr/lib/python2.7/dist-packages/polly/gui/theme.py:91: GtkWarning: gdk_window_set_icon_list: icons too large
  self.window.realize()
/usr/lib/python2.7/dist-packages/polly/gui/shell/main.py:195: GtkWarning: gdk_window_set_icon_list: icons too large
  self.present()
/usr/lib/python2.7/dist-packages/polly/gui/header/main.py:727: GtkWarning: gdk_window_set_icon_list: icons too large
  self.assistant_window.present()
 done
opera: Activated running instance
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 42, in set_password
    _keyring_backend.set_password(service_name, username, password)
  File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 166, in set_password
    raise PasswordSetError("cancelled by user")
keyring.backend.PasswordSetError: cancelled by user
DEBUG: ASSISTANT DELETED
DEBUG: MotionShot connected successfully
DEBUG: MotionShot disconnected successfully
finalizing... DEBUG: STREAM DELETED
DEBUG: ACCOUNT DELETED
done
clearing... done
Thank you for using Polly!
To contribute please visit https://launchpad.net/polly.
vistausss@vistaus-mbp:~$

And when I launch it again it asks me to authorize again and gives me this output:

vistausss@vistaus-mbp:~$ polly
Polly 0.93.6 (pre-alpha 3.6)
Copyright (C) 2011 Marcelo Hashimoto
cache path: /home/vistausss/.cache/polly
config path: /home/vistausss/.config/polly
data home: /home/vistausss/.local/share/polly
initializing.../usr/lib/python2.7/dist-packages/polly/gui/theme.py:91: GtkWarning: gdk_window_set_icon_list: icons too large
  self.window.realize()
/usr/lib/python2.7/dist-packages/polly/gui/shell/main.py:195: GtkWarning: gdk_window_set_icon_list: icons too large
  self.present()
/usr/lib/python2.7/dist-packages/polly/gui/header/main.py:727: GtkWarning: gdk_window_set_icon_list: icons too large
  self.assistant_window.present()
 done
DEBUG: ASSISTANT DELETED
finalizing... done
clearing... done

and then I have to authorize it again like I said.

Revision history for this message
Heimen Stoffels (vistaus) wrote :

Oh, never mind, it seems to be causes by a bug in gnome-keyring-daemon which is supposed to start automatically but it doesn't. I'll file a bug for gnome-keyring-daemon then.

Thanks anyway! :-)

Changed in polly:
status: New → Invalid
Revision history for this message
Heimen Stoffels (vistaus) wrote :

So I'm opening up this bug again because with Polly 0.93.7 the problem seems back and this time it isn't caused by gnome-settings-daemon because the settings daemon is already running.

Changed in polly:
status: Invalid → New
Revision history for this message
Conscious User (conscioususer) wrote :

Please post your terminal output again.

Revision history for this message
Heimen Stoffels (vistaus) wrote :

vistausss@vistaus-mbp:~$ polly
Polly 0.93.7 (pre-alpha 3.7)
Copyright (C) 2011 Marcelo Hashimoto
cache path: /home/vistausss/.cache/polly
config path: /home/vistausss/.config/polly
data home: /home/vistausss/.local/share/polly
initializing...Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
/usr/lib/python2.7/dist-packages/polly/gui/theme.py:91: GtkWarning: gdk_window_set_icon_list: icons too large
  self.window.realize()
/usr/lib/python2.7/dist-packages/polly/gui/shell/main.py:195: GtkWarning: gdk_window_set_icon_list: icons too large
  self.present()
/usr/lib/python2.7/dist-packages/polly/gui/header/main.py:727: GtkWarning: gdk_window_set_icon_list: icons too large
  self.assistant_window.present()
 done

Revision history for this message
Conscious User (conscioususer) wrote :

Does this log goes to until after you added an account?

Revision history for this message
Heimen Stoffels (vistaus) wrote :

Yes. But it doesn't show much useful output, just that it added it successfully and whatnot.

Revision history for this message
Conscious User (conscioususer) wrote :

Well, there isn't much I can do from here just with this log.

I'll mark this as incomplete until I can test on Raring, which might take a while.

Changed in polly:
status: New → Incomplete
Revision history for this message
Michael Tunnell (michaeltunnell) wrote :

I have this issue sort of...I get asked to unlock the keyring EVERY time I launch Polly but it doesn't lose any of my settings...so that's annoying but acceptable.

Revision history for this message
Michael Tunnell (michaeltunnell) wrote :

I just updated to 0.93.7 as I missed the update announcement but it appears to have fixed the asking for keyring access every time and now just works great.

Revision history for this message
Heimen Stoffels (vistaus) wrote :

The issue seemed to went away after a reinstall of 13.04 But now, almost a week later, the issue is back... well, at least, this morning. gnome-keyring-daemon was running like normal but Polly wanted me to authorize again.

Revision history for this message
markb (mark-blakeney) wrote :

This issue happens to me as well. After boot, my PC auto logs me in to GNOME shell. If I get to the PC before the GNOME screensaver slide (GS 3.8) then there will be a keyring prompt there for me to log in. Then Polly will run normally. However, if I boot my PC and don't get back to it before the screen slide kicks in (10 mins or so), then the keyring prompt is never seen and Polly then prompts me with the new account dialog. If I exit Polly and then start it again, Polly prompts for new account. Polly should remember account details have been entered and kick off the gnome keyring prompt whenever Polly is opened if authentication is pending.

Revision history for this message
Heimen Stoffels (vistaus) wrote :

The issue is still here. gnome-keyring-daemon is autostarted but every boot I have to re-authorize Polly again. This is getting very annoying...

Changed in polly:
status: Incomplete → New
Revision history for this message
Conscious User (conscioususer) wrote :

Please do not change the status. I do not have enough info to reproduce this myself, (and I tested on multiple distros) so "Incomplete" is the correct one.

Also, please do not add unnecessary comments. I *know* it's probably annoying for you. But receiving this kind of message about the work I do for free on my (currently very, very sparse) free time is also annoying.

Revision history for this message
Heimen Stoffels (vistaus) wrote :

I know how busy you are, for the record: I'm @Motionshot on Twitter.
I mean that it's getting annoying that this bug seems to come back every once in a while because it was gone and it's back now.

What info would you need from me so we can dig out this bug?

Revision history for this message
Conscious User (conscioususer) wrote :

There's not much to "dig out". The issue is likely on python-keyring, a library I have no control over.

Revision history for this message
Marc_Richter (the-judge) wrote :

I'm using Sabayon Linux, which is a rolling release distribution with quite recent applications and libraries. Since polly is not within the list of available packages in the repository of Entropy (paket manager of Sabayon), I did build 0.93.10 of Polly from source.

Everytime I launch it, I am presented with the "Add new Account" - Wizard. No restart of the system is necessary; it's enough to stop and restart Polly alone to make this happen. My settings like lanes and their arrangement is preserved.

When I start Polly on a terminal, there is nothing special showed and no error:

mr@judge ~ $ polly
Polly 0.93.10 (pre-alpha 3.10)
Copyright (C) 2011 Marcelo Hashimoto
cache path: /home/mr/.cache/polly
config path: /home/mr/.config/polly
data home: /home/mr/.local/share/polly
initializing... done

Revision history for this message
Tony Garnock-Jones (tonyg) wrote :

At least one of the calls to keyring.set_password is encoding self.name, but the call to keyring.get_password is not. I was suffering from the problem described in this bug report, with symptoms as follows:

1. start polly with no configuration (i.e. after deleting .config/polly)
2. register account with twitter successfully
3. presented with twitter timeline, all seems well
4. quit polly
5. read .config/polly/accounts -- it has a nonempty JSON array in it
6. start polly
7. oh dear! prompted to register with twitter again
8. without closing polly or taking any further gui action, read .config/polly/accounts -- it now has an empty JSON array in it, that is, the registration has already been overwritten

I may have fixed the issue by applying the following patch. Unfortunately, I can no longer reproduce the issue, even with the unmodified version of the code! So I can't quite confirm the fix. I can say, however, that before the patch it failed repeatedly, and on the first run after applying the patch, it successfully stored and retained the information needed for logging in to my twitter account. It's been fine since.

Polly 0.93.11 (pre-alpha 3.11)
from 0.93.11-0~427~ubuntu13.10.1
on Debian jessie

--- /usr/share/pyshared/polly/gui/twitter/account.py 2013-11-20 05:22:33.000000000 -0500
+++ account-tonyg-edits.py 2013-12-14 12:26:32.000000000 -0500
@@ -483,7 +483,7 @@
                     if id < 0:
                         raise ValueError

- subtoken_secret = keyring.get_password(self.name, subtoken)
+ subtoken_secret = keyring.get_password(self.name.encode(ENCODING), subtoken)

                     if subtoken_secret is None:
                         raise ValueError

Revision history for this message
Conscious User (conscioususer) wrote :

The suggested change does make sense, even if it might not be the cause for everyone who reported.

Changed in polly:
status: New → Fix Committed
Revision history for this message
Eliseu Cendron Carvalho (eliseucarvalho1983) wrote :

How do I apply this patch, Tony? I was looking for that account.py file but don't found it.
I'm running Polly 0.93.11 on Lubuntu 14.04 LTS.

Revision history for this message
IBBoard (ibboard) wrote :

I've just tried the patch and it didn't work for me - the file is /usr/lib/python2.7/site-packages/polly/gui/twitter/account.py on openSUSE, and you've got to re-compile the .pyc file afterwards. Polly 0.93.11 worked fine on openSUSE 13.1, but I've now upgraded to 13.2 and get the wizard appear each launch. I've also updated to 0.93.12 and still have the problem (using my OBS build https://build.opensuse.org/package/show/home:IBBoard:desktop/polly).

After an hour of poking and debugging, I've found the cause on my system, though. Basically, Polly had decided to use DBus instead of GnomeKeyring and so a) it wasn't reading the old values and b) for some reason that I don't understand then it wasn't setting values properly either (so newly created accounts got lost).

Prompted by a note on the Arch wiki [1] I found the Gnome Keyring change log [2], which says that v3.11.92 stopped exporting $GNOME_KEYRING_CONTROL and started using $XDG_RUNTIME_DIR instead (commit 2ca51a0a). The attached patch seems to fix it for me (although it would mean that any pre-gnome-keyring-3.11.92 systems that set XDG_RUNTIME_DIR might incorrectly show up as supporting GnomeKeyring).

Oddly, though, I was previously using the Gnome 3.12 repo on top of openSUSE 13.1, so I don't know why this didn't hit me sooner!

[1] https://wiki.archlinux.org/index.php/GNOME_Keyring
[2] http://ftp.gnome.org/pub/GNOME/sources/gnome-keyring/3.11/gnome-keyring-3.11.92.changes

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.