Bug 511279 - Google calendar appears as a resource in settings but not visible in korganizer/mercuro
Summary: Google calendar appears as a resource in settings but not visible in korganiz...
Status: RESOLVED NOT A BUG
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Google Resource (other bugs)
Version First Reported In: 6.4.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-28 18:21 UTC by mentiscompos+kdebug
Modified: 2025-11-14 15:32 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mentiscompos+kdebug 2025-10-28 18:21:18 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

Google groupware appears in settings (e.g. korganizer -> settings -> configure korganizer -> general -> calendars. But it does not appear in the left side bar where all the different calendar resources appear. 

STEPS TO REPRODUCE
1. In settings, or akonadiconsole, add google groupware.
2. Authenticate on google, get 'you can close this tab now' message
3. Google groupware appears in list of resources
4. Does not appear in the app. 

OBSERVED RESULT

The calendar and task list is not visible in the application sidebar, where you can choose to make calendars visible or not, change their color etc. There is no top level calendar folder for google groupware at all, as opposed to "nextcloud" for stuff synced from a nextcloud instance, or "personal calendar"

EXPECTED RESULT

The calendar should appear in the left side bar. 

SOFTWARE/OS VERSIONS

Operating System: openSUSE Tumbleweed-Slowroll 20251002
KDE Plasma Version: 6.4.5
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Kernel Version: 6.17.3-1.0.6.sr20251001-default (64-bit)
Graphics Platform: Wayland

First noticed in Korganizer version 6.5.1 (25.08.1)
Comment 1 mentiscompos+kdebug 2025-10-28 18:29:12 UTC
sorry, hit save before finishing...

when restarting the google groupware resource from akonadiconsole the log gives the following output: 

[2025-10-27T18:13:09.112Z] akonadiserver org.kde.pim.akonadiserver Shutting down "akonadi_google_resource_0" ...
[2025-10-27T18:13:09.112Z] akonadiserver org.kde.pim.akonadiserver Shutting down "akonadi_google_resource_0" ...
[2025-10-27T18:13:09.112Z] akonadiserver org.kde.pim.akonadiserver Subscriber "AgentBaseChangeRecorder - 94803635865392" disconnected
[2025-10-27T18:13:09.112Z] akonadiserver org.kde.pim.akonadiserver Subscriber "AgentBaseChangeRecorder - 94803635865392" disconnected
[2025-10-27T18:13:09.130Z] akonadi_control org.kde.pim.akonadicontrol Service "org.freedesktop.Akonadi.Agent.akonadi_google_resource_0" owner changed from ":1.1036" to ""
[2025-10-27T18:13:09.130Z] akonadiserver org.kde.pim.akonadiserver ItemRetrievalManager lost connection to resource "org.freedesktop.Akonadi.Resource.akonadi_google_resource_0" , discarding cached interface
[2025-10-27T18:13:09.130Z] akonadiserver org.kde.pim.akonadiserver ItemRetrievalManager lost connection to resource "org.freedesktop.Akonadi.Resource.akonadi_google_resource_0" , discarding cached interface
[2025-10-27T18:13:09.130Z] akonadi_control org.kde.pim.akonadicontrol Service "org.freedesktop.Akonadi.Resource.akonadi_google_resource_0" owner changed from ":1.1036" to ""
[2025-10-27T18:13:09.138Z] akonadi_control org.kde.pim.akonadicontrol Restarting application '/usr/bin/akonadi_google_resource'.
[2025-10-27T18:13:09.614Z] akonadiserver org.kde.pim.akonadiserver Database "/home/Computer/.local/share/akonadi/akonadi.db" opened using driver "QSQLITE"
[2025-10-27T18:13:09.614Z] akonadiserver org.kde.pim.akonadiserver Database "/home/Computer/.local/share/akonadi/akonadi.db" opened using driver "QSQLITE"
[2025-10-27T18:13:09.614Z] akonadiserver org.kde.pim.akonadiserver New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f04141dc710) )
[2025-10-27T18:13:09.614Z] akonadiserver org.kde.pim.akonadiserver New notification connection (registered as Akonadi::Server::NotificationSubscriber(0x7f04141dc710) )
[2025-10-27T18:13:09.678Z] akonadiserver org.kde.pim.akonadiserver Subscriber Akonadi::Server::NotificationSubscriber(0x7f04141dc710) identified as "AgentBaseChangeRecorder - 94087030921424"
[2025-10-27T18:13:09.678Z] akonadiserver org.kde.pim.akonadiserver Subscriber Akonadi::Server::NotificationSubscriber(0x7f04141dc710) identified as "AgentBaseChangeRecorder - 94087030921424"
[2025-10-27T18:13:09.679Z] akonadi_control org.kde.pim.akonadicontrol Service "org.freedesktop.Akonadi.Resource.akonadi_google_resource_0" owner changed from "" to ":1.1088"
[2025-10-27T18:13:09.680Z] akonadi_control org.kde.pim.akonadicontrol Service "org.freedesktop.Akonadi.Agent.akonadi_google_resource_0" owner changed from "" to ":1.1088"
[2025-10-27T18:13:10.162Z] akonadiserver org.kde.pim.akonadiserver DATABASE ERROR:
[2025-10-27T18:13:10.162Z] akonadiserver org.kde.pim.akonadiserver DATABASE ERROR:
[2025-10-27T18:13:10.162Z] akonadiserver org.kde.pim.akonadiserver   Error code: "2067"
[2025-10-27T18:13:10.162Z] akonadiserver org.kde.pim.akonadiserver   Error code: "2067"
[2025-10-27T18:13:10.163Z] akonadiserver org.kde.pim.akonadiserver   DB error:  "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name"
[2025-10-27T18:13:10.163Z] akonadiserver org.kde.pim.akonadiserver   DB error:  "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name"
[2025-10-27T18:13:10.163Z] akonadiserver org.kde.pim.akonadiserver   Error text: "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name Unable to fetch row"
[2025-10-27T18:13:10.163Z] akonadiserver org.kde.pim.akonadiserver   Error text: "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name Unable to fetch row"
[2025-10-27T18:13:10.163Z] akonadiserver org.kde.pim.akonadiserver   Values: QList(QVariant(QString, "contactGroups/starred"), QVariant(QString, ""), QVariant(QString, "starred"), QVariant(qlonglong, 103), QVariant(qlonglong, 12), QVariant(bool, true), QVariant(int, 2), QVariant(int, 2), QVariant(int, 2), QVariant(bool, true), QVariant(int, -1), QVariant(int, -1), QVariant(bool, false), QVariant(QString, ""), QVariant(bool, true))
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver   Values: QList(QVariant(QString, "contactGroups/starred"), QVariant(QString, ""), QVariant(QString, "starred"), QVariant(qlonglong, 103), QVariant(qlonglong, 12), QVariant(bool, true), QVariant(int, 2), QVariant(int, 2), QVariant(int, 2), QVariant(bool, true), QVariant(int, -1), QVariant(int, -1), QVariant(bool, false), QVariant(QString, ""), QVariant(bool, true))
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver   Query: "INSERT INTO CollectionTable (remoteId, remoteRevision, name, parentId, resourceId, enabled, syncPref, displayPref, indexPref, cachePolicyInherit, cachePolicyCheckInterval, cachePolicyCacheTimeout, cachePolicySyncOnDemand, cachePolicyLocalParts, isVirtual) VALUES (:0, :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14)"
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver   Query: "INSERT INTO CollectionTable (remoteId, remoteRevision, name, parentId, resourceId, enabled, syncPref, displayPref, indexPref, cachePolicyInherit, cachePolicyCheckInterval, cachePolicyCacheTimeout, cachePolicySyncOnDemand, cachePolicyLocalParts, isVirtual) VALUES (:0, :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14)"
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver Error during insertion into table "CollectionTable" "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name Unable to fetch row"
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver Error during insertion into table "CollectionTable" "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name Unable to fetch row"
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver Failed to append Collection "starred" in resource "akonadi_google_resource_0"
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver Failed to append Collection "starred" in resource "akonadi_google_resource_0"
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver Error while handling command CreateCollection on connection akonadi_google_resource_0 (0x55bf3343baf0)
[2025-10-27T18:13:10.164Z] akonadiserver org.kde.pim.akonadiserver Error while handling command CreateCollection on connection akonadi_google_resource_0 (0x55bf3343baf0)
Comment 2 Allen Winter 2025-11-13 17:38:58 UTC
hmm.. database error.
I don't know much about that.

maybe try:

1. remove the google resource from korganizer
2. close kontact or korganizer
3. clean the akonadi database by running from a command line
   'akonadictl fsck  && akonadictl vacuum`
4. start kontact or korganizer
5. re-add the google resource to korganizer
Comment 3 mentiscompos+kdebug 2025-11-14 15:32:45 UTC
I finally tracked down the problem. The problem was that somehow google was sending two collections named "starred" hence the failure at 
```
 Error during insertion into table "CollectionTable" "UNIQUE constraint failed: CollectionTable.parentId, CollectionTable.name Unable to fetch row"
Failed to append Collection "starred" in resource "akonadi_google_resource_0"
```

In my account online I had some contacts labeled "starred" (I don't know how that got there because I don't use google for my contacts, maybe through my phone??), once I removed that label the error went away and the calendar works as expected.