Kmail reports "Could not read the password" when trying to set an IMAP account online

Bug #1840007 reported by Lari Natri
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Akonadi
New
Medium
akonadi (Ubuntu)
Confirmed
Undecided
Unassigned
kmail (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

STEPS TO REPRODUCE
1. Try to set Gmail IMAP account online by checking mail.

OBSERVED RESULT
The account stays offline (folders are marked red) and the message "Could not read the password. User rejected wallet access" message can be seen in the Kmail's account settings. If password is changed there, it is updated correctly to the wallet as seen in Wallet Manager, but the error persists nevertheless.

EXPECTED RESULT
Account goes online and new messages are downloaded. (Actually, normally the account is online automatically.)

SOFTWARE/OS VERSIONS
Linux: 5.0.0-23
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.60.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION

KDE wallet is opened normally (at login through PAM) and Wallet Manager displays the wallet open and "kontact" as an attached application.

The problem appeared suddenly on two different machines around 10.8.2019, possibly after a package update. One system is Kubuntu 18.04 LTS and the other is Kubuntu 19.04, both with KDE backports repository enabled.

I noticed that around the time of the problem appearing, an update was installed to mitigate the .desktop file vulnerability. The following packages were upgraded:

libkf5config-data:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5configcore5:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5configgui5:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), dpkg:amd64 (1.19.6ubuntu1, 1.19.6ubuntu1.1), libkf5config-dev-bin:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5config-bin:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5config-dev:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5config-doc:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libdpkg-perl:amd64 (1.19.6ubuntu1, 1.19.6ubuntu1.1), dpkg-dev:amd64 (1.19.6ubuntu1, 1.19.6ubuntu1.1)

My apologies, if the tagged software package is incorrect.

I've also reported this bug in KDE bug tracker; bug id: 410872. Link: https://bugs.kde.org/show_bug.cgi?id=410872

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: akonadi-server 4:18.12.3-0ubuntu3
ProcVersionSignature: Ubuntu 5.0.0-23.24-generic 5.0.15
Uname: Linux 5.0.0-23-generic x86_64
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
CurrentDesktop: KDE
Date: Tue Aug 13 13:45:06 2019
EcryptfsInUse: Yes
InstallationDate: Installed on 2014-09-28 (1779 days ago)
InstallationMedia: Kubuntu-Plasma-5 14.10 "Utopic Unicorn" - Alpha amd64 (20140927)
SourcePackage: akonadi
UpgradeStatus: Upgraded to disco on 2019-04-23 (111 days ago)

Revision history for this message
In , Lari Natri (larva) wrote :

SUMMARY

STEPS TO REPRODUCE
1. Try to set Gmail IMAP account online by checking mail.

OBSERVED RESULT
The account stays offline (folders are marked red) and the message "Could not read the password. User rejected wallet access" message can be seen in the Kmail's account settings. If password is changed there, it is updated correctly to the wallet as seen in Wallet Manager, but the error persists nevertheless.

EXPECTED RESULT
Account goes online and new messages are downloaded. (Actually, normally the account is online automatically.)

SOFTWARE/OS VERSIONS
Linux: 5.0.0-23
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.60.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION

KDE wallet is opened normally (at login through PAM) and Wallet Manager displays the wallet open and "kontact" as an attached application.

The problem appeared suddenly on two different machines around 10.8.2019, possibly after a package update. One system is Kubuntu 18.04 LTS and the other is Kubuntu 19.04, both with KDE backports repository enabled.

I noticed that around the time of the problem appearing, an update was installed to mitigate the .desktop file vulnerability. The following packages were upgraded:

libkf5config-data:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5configcore5:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5configgui5:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), dpkg:amd64 (1.19.6ubuntu1, 1.19.6ubuntu1.1), libkf5config-dev-bin:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5config-bin:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5config-dev:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libkf5config-doc:amd64 (5.60.0-0ubuntu1~ubuntu19.04~ppa1, 5.60.0-0ubuntu2~ubuntu19.04~ppa1), libdpkg-perl:amd64 (1.19.6ubuntu1, 1.19.6ubuntu1.1), dpkg-dev:amd64 (1.19.6ubuntu1, 1.19.6ubuntu1.1)

My apologies, if this is a distribution specific bug, or if it is tagged with a wrong package.

Revision history for this message
Lari Natri (larva) wrote :
Revision history for this message
In , Lari Natri (larva) wrote :

I've reported this bug also on Ubuntu's bug tracker: https://bugs.launchpad.net/akonadi/+bug/1840007

Revision history for this message
In , Lari Natri (larva) wrote :

The underlying problem seems to be the one described in bug #404990.

The workaround mentioned in its 2nd comment, using PLAIN authentication method, fixes the problem.

The problem has nothing to do with KDE Wallet unlike the very misleading Kmail error -- that's why I'm not marking this bug as a duplicate.

Revision history for this message
Lari Natri (larva) wrote :

The underlying problem seems to be the one described in https://bugs.kde.org/show_bug.cgi?id=404990

The workaround mentioned in its 2nd comment, using PLAIN authentication method, fixes the problem.

The problem has nothing to do with KDE Wallet unlike the very misleading Kmail error -- that's why I'm not marking this bug as a duplicate.

Changed in akonadi:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Bugs-kde-org-6 (bugs-kde-org-6) wrote :

Workaround doesn't work in Kmail v5.7.3 because both password and connection settings (to set to "plain") are disabled.
Even for a freshly created IMAP connection.
Something in KDE is disabling these because the email is @gmail ?

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

Workaround doesn't work in Kmail v5.7.3 because both password and connection settings (to set to "plain") are disabled.
Even for a freshly created IMAP connection.
Something in KDE is disabling these because the email is @gmail ?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in akonadi (Ubuntu):
status: New → Confirmed
Changed in kmail (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Bugs-kde-org-6 (bugs-kde-org-6) wrote :

As soon as you set the IMAP server to imap.gmail.com you can see the password field goes disabled and the advanced connection settings are disabled and "gmail" type is forced.
This "helpful" would seem easy to undo, and then at least there would then be a way to connect KMail to Gmail again, because right now the feature is dead (and has been for months ?!?).

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

Work around isn't possible.
As soon as you set the IMAP server to imap.gmail.com you can see the password field goes disabled and the advanced connection settings are disabled and "gmail" type is forced.
This "helpful" would seem easy to undo, and then at least there would then be a way to connect KMail to Gmail again, because right now the feature is dead (and has been for months ?!?).
Suggest raising importance to something higher because it's an important feature, with no possible end user work around.

Revision history for this message
In , Bugs-kde-org-6 (bugs-kde-org-6) wrote :

Can't even work around this by using Akonadi Console to ('configure remote') set the Authentication to "1" instead of "9" because it's reset shortly after Kmail starts, and you get the popup of doom from Google again :(

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

Can't even work around this by using Akonadi Console to ('configure remote') set the Authentication to "1" instead of "9" because it's reset shortly after Kmail starts, and you get the popup of doom from Google again :(

Revision history for this message
In , D-contacn-a (d-contacn-a) wrote :

Has anyone found a working workaround?

Revision history for this message
In , Peter (auxsvr-gmail) wrote :

A workaround is in https://forum.kde.org/viewtopic.php?f=215&t=153459&sid=090ec7556cc1586493bcb7323f7c3404:

> Open KWalletManager > Search for LibKGAPI > Maps > *usercontent.com. Remove all entries from there.

It works for me.

Revision history for this message
In , Aitor Pazos (aitorpazos) wrote :

*** Bug 451998 has been marked as a duplicate of this bug. ***

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

Other bug subscribers

Remote bug watches

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