Bug 307731

Summary: kwalletd fails to properly setup its qdbusconnection causing it to not be accessible from any application
Product: [Applications] kwalletmanager Reporter: Craig Magina <craig.magina>
Component: generalAssignee: Michael Leupold <lemma>
Status: RESOLVED DUPLICATE    
Severity: normal CC: predder, raul_kde_bugzilla
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: xsession-errors file

Description Craig Magina 2012-10-02 14:43:00 UTC
When starting KDE from either a fresh boot or just re-logging in, kwalletd isn't being started properly or at the right time leaving the system unable to talk to it over dbus. When you start kwalletmanager or look at the .xsession-errors log you can see these messages every time an application tried to access it:

QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)

As a result of this issue, any application that uses kwallet for its password storage cannot get access and fails silently (i.e. kde-pim doesn't check for new mail; kde-telepathy fails to connect to all accounts)

This seems to have started with 4.9.0 and is present in 4.9.1 as well.

Reproducible: Sometimes

Steps to Reproduce:
1. Just freshly boot
2. Open kwalletmanager from a commandline
3.
Actual Results:  
You'll see the above qdbusconnection messages and if you attempt to open a wallet, after entering the password an empty wallet window will appear even though it should contain passwords.

Expected Results:  
All applications that use kwallet should get access to their passwords.

I find if I killed kwalletd and start it by hand it'll start working for some applications after being restarted (kde-pim but not kde-telepathy even after killing all telepathy services).
Comment 1 Christoph Feck 2012-10-02 22:04:22 UTC
The message should not be the cause for KWallet not working. I get this message with nearly every application since Qt was updated to 4.8, but all of them still work. Please ask in KDE forums or mailing lists to get help finding the issue on your system.

For more information, see http://kde.org/support/

*** This bug has been marked as a duplicate of bug 297020 ***
Comment 2 Craig Magina 2012-11-19 01:35:52 UTC
Ok, so the message is a red herring, however I am still experiencing the bug in KDE 4.9.2. Is there anywhere I can look for information regarding why this issue is occurring?
Comment 3 Craig Magina 2012-11-19 01:38:26 UTC
Created attachment 75350 [details]
xsession-errors file
Comment 4 Craig Magina 2012-11-19 01:40:43 UTC
I can go many reboots etc without hitting this, but then it'll start happening and rebooting or power cycling doesn't fix it.
Comment 5 Craig Magina 2012-11-20 16:54:02 UTC
Here is a link in the OpenSuSE forums talking about this issue with a workaround: http://forums.opensuse.org/english/get-technical-help-here/applications/478925-kwallet-either-doesnt-start-up-doesnt-open-wallet.html
I tried this and it did work for me.
Comment 6 Raul Kde Bugzilla 2013-01-15 23:29:21 UTC
Got same problem with latest Kubuntu update KDE 4.9.5:

-----
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.

[3105:3324:0115/211620:ERROR:object_proxy.cc(495)] Failed to call method: org.kde.KWallet.open: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[3105:3324:0115/211620:ERROR:native_backend_kwallet_x.cc(822)] Error contacting kwalletd (open)
QGridLayoutEngine::addItem: Cell (5, 1) already taken
[3109:3339:0115/211623:ERROR:object_proxy.cc(513)] Failed to call method: org.kde.KWallet.open: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[3109:3339:0115/211623:ERROR:native_backend_kwallet_x.cc(838)] Error contacting kwalletd (open)
-----


After killing kwalletd it restarts fine.

note that bug 297020 does not refer kwallet.
Comment 7 Nathan 2013-02-06 00:06:13 UTC
This is NOT a duplicate of 297020 . The dbus "may misbehave" warning is unrelated. 307731 happens on my system as well, consistently. On a fresh system startup or login no applications are able to communicate with kwalletd. Typing the password doesn't "open" the wallet. I can't delete wallets or create new ones from the kwalletmanager. Disabling and re-enabling the kwallet "fixes" the issue as per the suse forum link and everything works again as expected. The error is extremely frustrating because it prevented me joining a wireless network until I worked out what was going on.

kded4 --version
Qt: 4.8.3
KDE Development Platform: 4.9.4
KDE Daemon: $Id$

I believe this is the relevant entry in my .xsession-errors:
[2187:2231:0205/184557:ERROR:object_proxy.cc(513)] Failed to call method: org.kde.KWallet.open: object_path= /modules/kwalletd: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[2187:2231:0205/184557:ERROR:native_backend_kwallet_x.cc(838)] Error contacting kwalletd (open)
Comment 8 Nathan 2013-02-06 00:39:11 UTC
After further investigation I believe this is actually a duplicate of these:
https://bugs.kde.org/show_bug.cgi?id=254198
https://bugs.kde.org/show_bug.cgi?id=259229
https://bugs.kde.org/show_bug.cgi?id=123583

Bug 254198 being the "best fit".
Comment 9 Christoph Feck 2013-02-13 00:24:16 UTC

*** This bug has been marked as a duplicate of bug 254198 ***