After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661754 - Empathy can't connect to gtalk after reboot
Empathy can't connect to gtalk after reboot
Status: RESOLVED NOTGNOME
Product: empathy
Classification: Core
Component: Auth client
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-14 11:34 UTC by Alex Lourie
Modified: 2011-10-21 10:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Empathy log (2.31 KB, text/x-log)
2011-10-15 13:14 UTC, Alex Lourie
Details
telepathy-gabble log (2.31 KB, text/x-log)
2011-10-17 12:41 UTC, Alex Lourie
Details
telepathy-gabble log (30.42 KB, text/x-log)
2011-10-17 12:44 UTC, Alex Lourie
Details
The accounts log for empathy (127.81 KB, text/x-log)
2011-10-17 20:33 UTC, Alex Lourie
Details
dbus_empathy.log (8.66 KB, text/x-log)
2011-10-19 08:44 UTC, Alex Lourie
Details
dbus_empathy.log (356.64 KB, text/x-log)
2011-10-19 09:21 UTC, Alex Lourie
Details
accounts.log (127.28 KB, text/x-log)
2011-10-20 17:33 UTC, Alex Lourie
Details

Description Alex Lourie 2011-10-14 11:34:25 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.
Comment 1 Guillaume Desmottes 2011-10-14 17:45:56 UTC
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.
Comment 2 Alex Lourie 2011-10-14 19:13:56 UTC
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.
Comment 3 Guillaume Desmottes 2011-10-14 19:53:48 UTC
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.
Comment 4 Alex Lourie 2011-10-14 20:11:20 UTC
No, it just fails to connect.

I'll try to get the logs.
Comment 5 Alex Lourie 2011-10-15 13:14:55 UTC
Created attachment 199059 [details]
Empathy log

Empathy log on failure to connect to gtalk after reboot
Comment 6 Alex Lourie 2011-10-15 13:15:34 UTC
Verified that it fails on reboot. Attached the log file for Empathy.Auth
Comment 7 Guillaume Desmottes 2011-10-17 08:03:58 UTC
Hum it doesn't seem to provide a password. Can you attach telepathy-gabble logs as well please?
Comment 8 Alex Lourie 2011-10-17 08:07:27 UTC
Sure, where do I find them?
Comment 9 Guillaume Desmottes 2011-10-17 08:19:37 UTC
Using the debug window as well; just pick telepathy-gabble in the combo box.
Comment 10 Alex Lourie 2011-10-17 08:21:12 UTC
Oh-oh, I don't have it there.
Comment 11 Alex Lourie 2011-10-17 12:40:44 UTC
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.
Comment 12 Alex Lourie 2011-10-17 12:41:36 UTC
Created attachment 199192 [details]
telepathy-gabble log

telepathy-gabble log when launching empathy with failing authentication with gtalk.
Comment 13 Alex Lourie 2011-10-17 12:44:10 UTC
Created attachment 199196 [details]
telepathy-gabble log

telepathy-gabble log during empathy authentication with gtalk.
Comment 14 Guillaume Desmottes 2011-10-17 13:56:31 UTC
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?
Comment 15 Alex Lourie 2011-10-17 20:32:59 UTC
Hi Guillaume

Log is attached.
Comment 16 Alex Lourie 2011-10-17 20:33:45 UTC
Created attachment 199270 [details]
The accounts log for empathy
Comment 17 Guillaume Desmottes 2011-10-18 15:52:53 UTC
(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.
Comment 18 Alex Lourie 2011-10-18 17:26:32 UTC
Just checked. It's not there.
Comment 19 Guillaume Desmottes 2011-10-19 08:30:45 UTC
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.
Comment 20 Alex Lourie 2011-10-19 08:44:20 UTC
This all indeed is very strange. The log is attached.
Comment 21 Alex Lourie 2011-10-19 08:44:50 UTC
Created attachment 199404 [details]
dbus_empathy.log
Comment 22 Guillaume Desmottes 2011-10-19 09:06:53 UTC
humm I don't see the Connection process in this log (I need calls to RequestConnection). I guess you started the log too late.
Comment 23 Alex Lourie 2011-10-19 09:21:12 UTC
Oh shoot, I tried again. Let me know if it's ok.
Comment 24 Alex Lourie 2011-10-19 09:21:48 UTC
Created attachment 199408 [details]
dbus_empathy.log
Comment 25 Guillaume Desmottes 2011-10-20 09:43:46 UTC
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.
Comment 26 Alex Lourie 2011-10-20 10:51:16 UTC
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...
Comment 27 Stef Walter 2011-10-20 12:46:48 UTC
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
Comment 28 Alex Lourie 2011-10-20 12:55:35 UTC
But what does it mean? There are more passwords stored that aren't seen?
Comment 29 Stef Walter 2011-10-20 15:02:56 UTC
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?
Comment 30 Guillaume Desmottes 2011-10-20 16:14:16 UTC
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.
Comment 31 Alex Lourie 2011-10-20 17:32:49 UTC
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.
Comment 32 Alex Lourie 2011-10-20 17:33:19 UTC
Created attachment 199559 [details]
accounts.log
Comment 33 Alex Lourie 2011-10-20 18:08:59 UTC
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.
Comment 34 Guillaume Desmottes 2011-10-21 07:59:48 UTC
Humm but Empathy isn't supposed to use the MC gnome-keyring at all. Does removing it from seahorse solve the problem?
Comment 35 Alex Lourie 2011-10-21 08:30:47 UTC
Which one should I remove, the old one or the new one?
Comment 36 Guillaume Desmottes 2011-10-21 08:49:01 UTC
The old one: "account: gabble/jabber/djay_2eil_40gmail_2ecom0; param: password"
Comment 37 Alex Lourie 2011-10-21 08:58:01 UTC
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?!?
Comment 38 Guillaume Desmottes 2011-10-21 09:08:43 UTC
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.
Comment 39 Guillaume Desmottes 2011-10-21 10:14:49 UTC
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