Bug 313965 - KWallet does not report errors
Summary: KWallet does not report errors
Status: RESOLVED NOT A BUG
Alias: None
Product: telepathy
Classification: Unmaintained
Component: general (show other bugs)
Version: 0.5.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-27 10:55 UTC by Martin Klapetek
Modified: 2013-02-06 21:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Klapetek 2013-01-27 10:55:59 UTC
+++ This bug was initially created as a clone of Bug #313955 +++

Application: ktp-contactlist (0.5.2)
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-36-generic i686
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
My system crashed (power outage) and afterwards my Telepathy accounts would not connect anymore, complaining about an authentication failure after a while. So I went to the settings and wanted to look at the configuration, and maybe set the password again. However, when clicking on Edit, the Account Configuration Dialog for that account would not show up (I saw something flash for a split second, which may have been a window being created and immediately destroyed). So I closed the settings again - and Contact List crashed.

I was able to repeat the same thing with the Presence Plasmoid, when right-clicking and selecting Account Management/Configuration ("Zugangsverwaltung" in German).

Using the kwalletmanager I figured out that the KWallet is apparently not reachable - the manager displayed an empty wallet. So I killed "kwalletd" and it was automatically restarted, and now everything seems to work again.

So I assume the bug here is that the Telepathy Authentication Handler does not report KWallet problems to the user, and that the Account Configuration Dialog fails to show up when KWallet is not reachable and later makes the program crash entirely.
Comment 1 Dennis Schridde 2013-01-28 14:03:29 UTC
The subject should probably be changed to: Telepathy reports meaningless "authentication failed" when it fails to contact KWallet.
Since it *does* report an error when trying to reach KWallet, but that error is a generic one - it even reminds me to check my password - which does not help at all in identifying the problem (KWallet being broken in some way).
Comment 2 Martin Klapetek 2013-01-28 14:23:02 UTC
That error comes from the server itself, when it tries to authenticate you with an empty(?) password and as such is correct, but that's a different problem from broken kwallet.
Comment 3 Dennis Schridde 2013-01-28 14:41:55 UTC
(In reply to comment #2)
> That error comes from the server itself, when it tries to authenticate you
> with an empty(?) password and as such is correct
So Telepathy/KDE tries to authenticate with an empty password, when it cannot get a password/reply from KWallet? That seems very wrong already.
Comment 4 Martin Klapetek 2013-01-28 15:21:22 UTC
Actually I just checked the auth-handler code for kwallet and here's the process (can any KTp dev check my braindump):

1/ We get to handle the sasl channel, try open kwallet
2/ KTp::Wallet::Interface kicks in
2.1/ We check if KWallet is already opened, open it if not
2.2/ Return KTp::PendingWallet, which waits for KWallet to be opened (or finishes right away if already opened)
3/ KTp::PendingWallet is finished(), we start requesting sasl channel properties for the auth details

^ Now this would never happened if KWallet itself wouldn't signal "I'm ready to be used", right?

So your wallet returned "Im ready" and we go on:
4/ Received channel properties, checking if Telepathy asks us for password (it does)
5/ If we're trying to auth for the first time, we ask KWallet if it has a password for us
5.1/ If it has, we try authenticate with KWallet password
5.2/ If not, we prompt for password dialog

So...your wallet said "I have a password for this account, here you go" and if the password reading itself fails, we do return empty password (KTp/wallet-interface.cpp line 123). But again - we're asking the wallet twice, if it actually has the password we're asking for and we abort properly if not (show the password dialog). 

To sum it up - I think it was simply KWallet malformed and I can't see anything more we could do to check the state of your wallet. Therefore I'm closing it as invalid. Guys, please recheck this and reopen if I've made a mistake. Thanks.
Comment 5 David Edmundson 2013-01-28 15:57:06 UTC
> So Telepathy/KDE tries to authenticate with an empty password, when it cannot get a password/reply from KWallet? That seems very wrong already.

It does not. 



I don't fully understand what happened there. If you can reprodce it let me know and we'll get some debug output from the auth handler.
Comment 6 Dennis Schridde 2013-02-06 21:16:36 UTC
(In reply to comment #5)
> > So Telepathy/KDE tries to authenticate with an empty password, when it cannot get a password/reply from KWallet? That seems very wrong already.
> I don't fully understand what happened there. If you can reprodce it let me
> know and we'll get some debug output from the auth handler.

So far this has not happened again - it appears my KWallet is now officially unbroken. :) (And thus the potential bug in Telepathy/KDE no longer reproducible.)

Thanks for your efforts!