GNOME Bugzilla – Bug 661754
Empathy can't connect to gtalk after reboot
Last modified: 2011-10-21 10:14:49 UTC
I have a 2-step authentication process set for Gmail and apps. I have created an application-specific password for the gtalk to use with Empathy. Unfortunately, after each restart, the authentication fails. To resolve the issue, I need to reinsert the password once again. This is a major inconvenience.
So you can log in once but hte password is not saved? Are you asking Empathy to save it when entering the password? We don't support the 2-step auth process (bug #647007) so I'm wondering how manage to connect at all.
Yes, you're correct, it is working fine once I enter the password. But it doesn't seem to be saved, and when I restart it uses some "other" password to connect. I need to reenter the same password again to get it working.
So it fails to connect or doesn't connect at all? I mean is it trying to connect using a wrong password? Would be good if you could attach Empathy.AuthClient logs when trying to connect. You can get them from the help - debug menu.
No, it just fails to connect. I'll try to get the logs.
Created attachment 199059 [details] Empathy log Empathy log on failure to connect to gtalk after reboot
Verified that it fails on reboot. Attached the log file for Empathy.Auth
Hum it doesn't seem to provide a password. Can you attach telepathy-gabble logs as well please?
Sure, where do I find them?
Using the debug window as well; just pick telepathy-gabble in the combo box.
Oh-oh, I don't have it there.
OK, I figured on help pages how to log telepathy-gabble. I ran the log, started empathy, and saved the log. It is now attached.
Created attachment 199192 [details] telepathy-gabble log telepathy-gabble log when launching empathy with failing authentication with gtalk.
Created attachment 199196 [details] telepathy-gabble log telepathy-gabble log during empathy authentication with gtalk.
Ok, so indeed you did pass some password to the server and this password appears to be wrong. Looks like mission-control is passing a wrong password when connecting the account. MC isn't supposed to store passwords any more. Could you please start: EMPATHY_DEBUG=all EMPATHY_LOGFILE=/tmp/accounts.log empathy-accounts and attach this log file?
Hi Guillaume Log is attached.
Created attachment 199270 [details] The accounts log for empathy
(empathy-accounts:2621): empathy-DEBUG: empathy_account_settings_try_migrating_password: Trying to migrate password parameter from MC to the keyring ourselves for account gabble/jabber/djay_2eil_40gmail_2ecom0 humm so this is called but then no more logs about it. Sorry but I'll need more infos :) - Check what's the ID of your account using "mc-tool list" (it's probably gabble/jabber/djay_2eil_40gmail_2ecom0 but best to double check) - Use "mc-tool show gabble/jabber/djay_2eil_40gmail_2ecom0" and check if there is something like: (string) password = xxxxx I don't need the password itself (of course :) but would like to know if it's there and if it's the right password or a wrong (or empty) one.
Just checked. It's not there.
Humm weird, where does this come frome then: (telepathy-gabble:863): tp-glib/params-DEBUG: tp_base_protocol_sanitize_parameters: using specified value for account: "djay.il@gmail.com" (telepathy-gabble:863): tp-glib/params-DEBUG: tp_base_protocol_sanitize_parameters: using specified value for password: <secret> Could you attach a d-bus log when connecting? Just use "dbus-monitor > /tmp/dbus.log" and try to connect. Double check that your password isn't in this file before attaching it.
This all indeed is very strange. The log is attached.
Created attachment 199404 [details] dbus_empathy.log
humm I don't see the Connection process in this log (I need calls to RequestConnection). I guess you started the log too late.
Oh shoot, I tried again. Let me know if it's ok.
Created attachment 199408 [details] dbus_empathy.log
Ok, so it does find a password in gnome-keyring but it doesn't seem to be the right one. Could you please open 'seahorse', search for gabble/jabber/djay_2eil_40gmail_2ecom0 and look for a key named "IM account password for gabble/jabber/djay_2eil_40gmail_2ecom0. Then check which password is stored.
Found it. The stored password is wrong. I have 2 accounts: one is called "account: gabble/jabber/djay_2eil_40gmail_2ecom0; param: password", the second is "IM account password for New Google Talk account (gabble/jabber/djay_2eil_40gmail_2ecom0)" The password stored in both is the same and incorrect. That is, it became incorrect when I moved to 2-step authentication on google - I now use different application password for each application. Maybe it's a leftover from previous configuration? Even if so, I guess it should work...
I need to change gnome-keyring so it returns the newest result first. I had a bug for this, but can't find it now :S
But what does it mean? There are more passwords stored that aren't seen?
It means that telepathy has stored multiple passwords in the keyring, but when searching telepathy is only using the first one returned from the keyring. The order of results was previously undefined, and in many cases (like yours) an older password was returned. Changes to gnome-keyring: commit bc01094411d724470ebda56d4515f45760f8d008 Author: Stef Walter <stefw@collabora.co.uk> Date: Thu Oct 20 16:38:00 2011 +0200 secret-store: Return results with the most recent result first * This is to help programs that have erroneusly stored more than one password with given attributes, and keep finding the old one. * The most recent one is usually correct. Changes to libgnome-keyring: commit aa30fea129bda264f66f4122201e61941d769614 Author: Stef Walter <stefw@collabora.co.uk> Date: Thu Oct 20 16:59:19 2011 +0200 Make sure to return find results in original order from daemon * And add a testing tool to check the order These changes will be included in the 3.2.2 and 3.3.1 releases. Guillamme, does this fix all aspects of this?
Don't think so. It seems that Alex's keyring contains 2 entries: one is the old deprecated CM key and the other is the new empathy-auth-client one (they don't use the same schema). According to him they both contain an old password (before he changed it using Google's services). Can't you change it using empathy-accounts if you tick the box to remember the password? If not please attach the empathy-accounts logs when doing it.
Sure, here it is. By the way, now it is changed in the keyring as well (the second one, of course). I will restart the computer to see what's going on after restart.
Created attachment 199559 [details] accounts.log
OK, so as I expected, the restart broke it again. But, this time, the second keyring has the correct password, so I guess Stef's fix should resolve it. What I don't understand, of course, is why the keyring previously held the wrong value, and it is the correct one that persisted after reboot.
Humm but Empathy isn't supposed to use the MC gnome-keyring at all. Does removing it from seahorse solve the problem?
Which one should I remove, the old one or the new one?
The old one: "account: gabble/jabber/djay_2eil_40gmail_2ecom0; param: password"
OK, now I'm in very strange land. 1. I removed the old account. 2. Empathy still can't connect. 3. Seahorse shows the only "IM..." entry, but the password now is WRONG!! (it's back to the old one) What's going on?!?
Humm maybe Empathy was re-importing the old key and so erasing the new value? I'll check the code. Anyway, removing the new key as well should fix your issue.
Got it! That's because mission-control doesn't actually remove the old password when migrating: https://bugs.freedesktop.org/show_bug.cgi?id=42088