Bug 506158 - Akonadi / korganizer can't fetch password (google account)
Summary: Akonadi / korganizer can't fetch password (google account)
Status: REPORTED
Alias: None
Product: korganizer
Classification: Applications
Component: groupware (other bugs)
Version First Reported In: 6.4.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 505155 505218 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-06-25 11:34 UTC by willem
Modified: 2025-10-02 17:27 UTC (History)
12 users (show)

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


Attachments
screenprint kwalletmanager (19.36 KB, image/png)
2025-06-26 14:51 UTC, willem
Details

Note You need to log in before you can comment on or make changes to this bug.
Description willem 2025-06-25 11:34:54 UTC
SUMMARY
korganizor can't authenticate and connect to my gmail calender

STEPS TO REPRODUCE
1. add my google calender account info as a resource for korganizer
2. log in in the google authentication page
3. accept google TFA-challenge
4. korganizer can't fetch password

OBSERVED RESULT
message: "Can't fetch password"

EXPECTED RESULT
connection to my google callender and korganizor showing my appointments

SOFTWARE/OS VERSIONS
MESA-INTEL: warning: Haswell Vulkan support is incomplete
Operating System: EndeavourOS / Arch
KDE Plasma Version: 6.4.0
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.1
Kernel Version: 6.12.34-1-lts (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-4570R CPU @ 2.70GHz
Memory: 8 GiB of RAM (7.7 GiB usable)
Graphics Processor: Intel® Iris® Pro Graphics 5200

ADDITIONAL INFORMATION
Comment 1 willem 2025-06-25 18:40:42 UTC
In the logs I see:

jun 25 20:39:15 vivobookEOS001 akonadiserver[2094]: org.kde.pim.akonadiserver: Subscriber "AgentBaseChangeRecorder - 105091932967344" disconnected
jun 25 20:39:15 vivobookEOS001 akonadi_control[1992]: org.kde.pim.akonadicontrol: Restarting application '/usr/bin/akonadi_google_resource'.
jun 25 20:39:15 vivobookEOS001 akonadiserver[2094]: org.kde.pim.akonadiserver: New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x70782c06ac40) )
jun 25 20:39:15 vivobookEOS001 akonadi_google_resource[37949]: org.kde.pim.google: Trying to read password for "<redacted>"
jun 25 20:39:15 vivobookEOS001 akonadiserver[2094]: org.kde.pim.akonadiserver: Subscriber Akonadi::Server::NotificationSubscriber(0x70782c06ac40) identified as "AgentBaseChangeRecorder - 99079941589392"
jun 25 20:39:15 vivobookEOS001 akonadi_google_resource[37949]: org.kde.pim.google: Unable to read password 1
Comment 2 willem 2025-06-25 18:42:06 UTC
Happens on all the machines with korganizer (kontact suite) and for all google/gmail accounts. It used to work untill recently.
Comment 3 Carl Schwan 2025-06-26 08:58:34 UTC
Can you check if in KWallet manager, you have an entry for the email address in "Akonadi Google" -> Binary Data?
Comment 4 Bug Janitor Service 2025-06-26 09:16:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/kdepim-runtime/-/merge_requests/250
Comment 5 Carl Schwan 2025-06-26 12:54:17 UTC
Git commit edf19717d8db505e469da1ce0b7905371ae3b254 by Carl Schwan.
Committed on 26/06/2025 at 09:25.
Pushed by carlschwan into branch 'master'.

google-resource: Display QtKeychain error in Akonadi status

M  +2    -1    resources/google-groupware/googleconfig.cpp
M  +4    -2    resources/google-groupware/googleresource.cpp
M  +2    -2    resources/google-groupware/googlesettings.cpp
M  +1    -1    resources/google-groupware/googlesettings.h

https://invent.kde.org/pim/kdepim-runtime/-/commit/edf19717d8db505e469da1ce0b7905371ae3b254
Comment 6 willem 2025-06-26 14:51:47 UTC
Created attachment 182688 [details]
screenprint kwalletmanager

Please see attachment
Comment 7 willem 2025-06-26 14:54:06 UTC
I can't check my other system just now
Comment 8 willem 2025-06-26 15:55:42 UTC
Checked my other system. Akonadi Google looks exactly the same as in the above screen print
Comment 9 Allen Winter 2025-06-28 14:56:56 UTC
one thing you might try is removing the Akonadi Google folder in the KWalletManager and starting over

you might need to kill kontact/korganizer and akonadi first (akonadictl stop)
Comment 10 Carl Schwan 2025-06-29 20:28:49 UTC
Okay, it seems the access tokens are no longer present from KWallet. I wonder if this either because Akonadi or another process removed them, or a side effect from some changes in KWallet for Plasma 6.4
Comment 11 willem 2025-06-30 05:54:37 UTC
What can I do now to help analyze the issue?

In its current state korganizer is not useful, I'm afraid, as it does not help me get organized ;-)
Comment 12 willem 2025-07-01 11:12:53 UTC
I have not changed anything, but korganizer is showing all my appointments again. 
So, I'll mark this as resolved.
Comment 13 Daniel M 2025-07-09 19:53:11 UTC
I am experiencing the same issue; in Wallet Manager I have my email address in Maps for Akonadi Google and Binary Data.

Operating System: Void 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.14.0
Qt Version: 6.8.2
Kernel Version: 6.15.4_1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics
Memory: 58.6 GiB of RAM
Graphics Processor: AMD Radeon 780M
Comment 14 Allen Winter 2025-07-20 13:03:15 UTC
you might try opening the Calendar Properties menu.  then press the Configure
button in the dialog.  sign into Google and make sure you've enabled  access 

in case you don't know where he Calendar properties menu is..
go down into the left bottom corner where all your calendars are listed
find the top-level of the google calendar list.  right menu on that.
Comment 15 Daniel M 2025-07-20 14:07:22 UTC
(In reply to Allen Winter from comment #14)
> you might try opening the Calendar Properties menu.  then press the Configure
> button in the dialog.  sign into Google and make sure you've enabled  access

This resolves the issue, but it returns a day or two later.
Comment 16 Daniel M 2025-07-23 04:43:41 UTC
I can confirm the issue persists with KDE Plasma Version: 6.4.3.
Comment 17 Daniel M 2025-07-23 16:30:47 UTC
I believe https://bugs.kde.org/show_bug.cgi?id=505218 and https://bugs.kde.org/show_bug.cgi?id=505155 are related.
Comment 18 TraceyC 2025-07-23 19:52:27 UTC
*** Bug 505218 has been marked as a duplicate of this bug. ***
Comment 19 TraceyC 2025-07-23 19:54:43 UTC
Copying from the duplicate report:

> Akonadi apps like KOrganizer or Merkuro can't connect to Google Calendar just next day after adding Google account. I suppose the problem is caused by how Akonadi stores data in KWallet. After adding Google Calendar, in KWalletManager I can see Akonadi Google folder, which has binary data folder in itself. In this binary data there is a subfolder named after my google mail address and I can see there something like the output of hex editor. On the right side there is a Google URL with token encoded. By the next day when I encounter the problem, when I look into KWalletManager, the binary data folder is empty, and the subfolder named after my Google mail address is not there, but inside the maps folder. But there are no mappings (key-value pairs). So I'm not surprised, that Akonadi doesn't know how to access Google Calendar, when it doesn't have proper tokens and passwords in KWallet (binary data are gone, mappings are empty). You can reenable Google account only if you manually delete Akonadi Google folder in KWalletManager. Tested by me many times.
Comment 20 TraceyC 2025-07-23 19:54:52 UTC
*** Bug 505155 has been marked as a duplicate of this bug. ***
Comment 21 michaelk83 2025-07-24 07:27:45 UTC
I'll note that the other two bugs were reported against KDE Frameworks 6.14, as was comment 13 here, so this may be caused by the (fairly large) changes in KWallet in that version. It might also be related to bug 503290, though less likely.
Comment 22 Daniel M 2025-07-29 21:50:43 UTC
(In reply to Daniel M from comment #15)
> (In reply to Allen Winter from comment #14)
> > you might try opening the Calendar Properties menu.  then press the Configure
> > button in the dialog.  sign into Google and make sure you've enabled  access
> 
> This resolves the issue, but it returns a day or two later.

Actually, this no longer resolves the issue for me; korganizer just stays broken with "Resource is not configured" or "Can't fetch password" as it relates to Google after doing this.
Comment 23 Daniel M 2025-08-06 15:06:28 UTC
Anyone have any thoughts on a potential workaround until a actual fix can be made?
Comment 24 Csaba Csatári-Szűcs 2025-08-15 22:12:57 UTC
The followings solved the problem for me:
1. In KWalletManager, delete the entry of the related account under Akonadi Google > Maps (Kaarten).
2. Reconfigure the resource in Calendar Properties. A new entry will be created in KWallet under Binary Data with the same name.

I think the cause of the problem is that two entry can't have the same name under Akonadi Google, which prevents Akonadi from creating the entry in Binary Data.
Comment 25 Daniel M 2025-08-15 22:22:28 UTC
I just tried this, but the issue persists.
Comment 26 Daniel M 2025-08-22 17:37:45 UTC
For me, so far, this issue appears to have been resolved with an update to kwallet and a quick re-configuring of the Google Groupware in Calendars.
Comment 27 TraceyC 2025-08-22 19:02:05 UTC
(In reply to Daniel M from comment #26)
> For me, so far, this issue appears to have been resolved with an update to
> kwallet and a quick re-configuring of the Google Groupware in Calendars.

That's great news.

For anyone else affected, can you see if, after an update to KWallet, you can also re-configure your Google Calendars and access them?
Comment 28 Allen Winter 2025-09-08 14:57:08 UTC
I *think* a fix on the kdepim-run side of things that just landed things will work better in the next release 25.08.1 due in a few days.
commit a4b1a88edfd7516caf24bdb18e5189769ed7506d in kdepim-runtime
Comment 29 Matija Šuklje 2025-09-10 18:13:50 UTC
The removal of the map entry in KWallet and reconfiguring the Google Calendar resource in KOrganizer worked for me too.
Comment 30 twofacedsquare 2025-09-13 18:27:43 UTC
I can confirm the issue is present with a fresh install of Fedora KDE

I installed this yesterday, and setup Korganizer after completing all updates. Looked today and it is showing "Unable to read password: Unsupported entry type 'Map'"

Deleting the entry under maps seems to only work temporarily.
Comment 31 Daniel M 2025-09-13 19:19:00 UTC
(In reply to twofacedsquare from comment #30)
> I can confirm the issue is present with a fresh install of Fedora KDE
> 
> I installed this yesterday, and setup Korganizer after completing all
> updates.

What version of kwallet are you running?
Comment 32 twofacedsquare 2025-09-13 21:07:17 UTC
(In reply to Daniel M from comment #31)
> (In reply to twofacedsquare from comment #30)
> > I can confirm the issue is present with a fresh install of Fedora KDE
> > 
> > I installed this yesterday, and setup Korganizer after completing all
> > updates.
> 
> What version of kwallet are you running?

kwallet.x86_64 4.12.3-27.fc42 fedora
Comment 33 michaelk83 2025-09-14 09:24:56 UTC
(In reply to twofacedsquare from comment #32)
> (In reply to Daniel M from comment #31)
> > What version of kwallet are you running?
> 
> kwallet.x86_64 4.12.3-27.fc42 fedora

That's an ancient version. You may be seeing a completely different bug. Your reported error message "Unsupported entry type 'Map'" may point to a different bug as well.

Modern KWallet on Fedora is in the kf6-kwallet package. Keep in mind that it may bring in a bunch of other modern dependencies (though most of those should already be installed on a modern Fedora 42 setup). Conversely, kwallet 4.12.3 likely pulled in a bunch of legacy dependencies.
Comment 34 TraceyC 2025-09-15 19:35:11 UTC
Can anyone still reproduce this with korganizer 25.08.1 or later and kf6-kwallet 6.18.0 or later?
Comment 35 willem 2025-09-16 09:50:35 UTC
(In reply to TraceyC from comment #34)
> Can anyone still reproduce this with korganizer 25.08.1 or later and
> kf6-kwallet 6.18.0 or later?

Sorry, I can't give you info : stopped using kontact/kmail/korganizer as it did/does not play well with my google accounts.
Comment 36 Cristian Le 2025-09-17 11:07:23 UTC
To clarify on the comment that stated that `kwallet.x86_64 4.12.3-27.fc42` was used, that is not the case. On my system only `kf6-kwallet-6.17.0-1.fc42.src.rpm` is installed. But regarding korganizer, that doesn't seem to be a direct dependence [1]. Probably it is used from the dbus interface as that seems to be the current sercet-service installed.

I don't have the current status of this to report since I had a different issue to cleanup the calendar sources after I have botched doing the delete the entry in kwallet-manager, but I did had this issue as late as the last kf6-framework update in Fedora (25.04 I believe), and I only interact with this service from merkuro-calendar

[1]: https://src.fedoraproject.org/rpms/korganizer/blob/rawhide/f/korganizer.spec
Comment 37 Cristian Le 2025-09-23 08:08:42 UTC
Just an update from my side, my current observable bug is
```
unable to read password: Unsupported entry type 'Map'
```

- kf6-kwallet-6.18.0-1.fc42
- korganizer-25.08.0-1.fc42
Comment 38 michaelk83 2025-09-23 10:48:37 UTC
(In reply to Cristian Le from comment #37)
> Just an update from my side, my current observable bug is
> ```
> unable to read password: Unsupported entry type 'Map'
> ```
> 
> - kf6-kwallet-6.18.0-1.fc42
> - korganizer-25.08.0-1.fc42

Christian, do you have a Map type entry for Akonadi Google in KWallet? If so , try removing it, then reconfigure the account and see if that solves the problem. See comment 24 for details.
Comment 39 Cristian Le 2025-09-24 13:41:28 UTC
(In reply to michaelk83 from comment #38)
> Christian, do you have a Map type entry for Akonadi Google in KWallet? If so
> , try removing it, then reconfigure the account and see if that solves the
> problem. See comment 24 for details.

I did that before (but probably deleting too much) and ended up chasing my tail trying to recover from that. The entry though was created from a clean (no `Akonadi Google` entry in KWallet), so there could be a bug in that part.

Anyway I re-did it and will report back in a few days if it is stable.
Comment 40 Cristian Le 2025-09-25 13:10:21 UTC
Update, yes the approach Michael suggested worked. So the only issue in here is the fact that Map type was added by default when starting with a clean KWallet for Akonadi. Or make it recognize Map type.
Comment 41 Cristian Le 2025-10-02 11:21:24 UTC
Yet another update from me because it just failed by itself after some time with "Resource is not configured" and looking at the kwallet entry it is again set as a map. Is there a different build to try that is supposed to have fixed the issues in this thread?