Bug 357819

Summary: Korganizer doesn't send calendar events to Google account
Product: [Frameworks and Libraries] Akonadi Reporter: Tom Kijas <t.kijas>
Component: Google ResourceAssignee: Daniel Vrátil <dvratil>
Status: REPORTED ---    
Severity: critical CC: damikope, dvratil, groszdanielpub, jesusrop, kde, kdepim-bugs, kishore96, ostroffjh, p.wibberley, peterriesde, sannythebest95, t.kijas, ti, winter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tom Kijas 2016-01-10 22:19:40 UTC
Korganizer doesn't send calendar events to Google account.
Google account is connected properly.

Reproducible: Always

Steps to Reproduce:
1. Connect google account (calendar) in korganizer properly
2. Create an event in google's calendar in Korganizer
3. Open that Google calendar in browser or another freshly synchronized Korganizer on another computer

Actual Results:  
The freshly created calendar event is not there.

Expected Results:  
The new event should appear.

This situation persist from KDE4.13 and it is terrible to use Korganizer/Kontact in companies, when this basic function is broken.
Comment 1 Tom Kijas 2016-01-10 22:21:25 UTC
Strange thing is that every time I delete and re-enable google account in Korganizer, for few hours/days, it does work. After few hours/days, it fails.
Comment 2 Jesús 2016-03-28 08:14:43 UTC
This is happening to me too!
Comment 3 Tom Kijas 2017-02-27 12:18:29 UTC
A year and situation is the same, Korganizer is unusable in companies that use google's services.
Comment 4 Daniel Robbins 2018-12-03 16:50:25 UTC
Just switched to Linux from Mac about 3 weeks ago. Also experiencing this.
Comment 5 Tom Kijas 2019-02-08 08:20:02 UTC
that's crazy, this bug exists for two years...
Comment 6 Thomas Iguchi 2019-08-13 16:19:10 UTC
I have sync problems in both directions. Log output in .xsession-errors seems very sparse and not really helpful. There are repeated log lines like these:

org.kde.pim.akonadiserver: Error while handling command ModifyCollection on connection akonadi_googlecalendar_resource_0
org.kde.kgapi: Requested resource does not exist

The only way to get Google calendar sync temporarily working (for maybe 10 minutes) is by restarting each calendar account in the settings.

Not sure if that's related, but the Google access token expires beforehand:

KGAPI2::CalendarFetchJob(0x55a957f330f0) "Invalid authentication."                                                                                                                                                
org.kde.kgapi: Unauthorized. Access token has expired or is invalid.


Maybe the token is not properly refreshed in that case of failure.
Comment 7 Jack 2023-09-07 18:07:56 UTC
Seems to still exist with KOrganizer 5.24.0 (23.08.0) on Artix Linux.  Not sure if this is the same or related to bugs about not fetching calendar info.
Comment 8 Peter Ries 2023-09-09 07:31:18 UTC
@jack: can confirm that it stopped working somewhen during the last days. My Calendar synced fine in both directions but I saw that some newer events were not synced anymore. I tried adding an event to Korganizer as well as Google via browser. Both only stayed where I created them. No sync. 

PIM mudule says "Ready". I even tried to re-authenticate. No effect. No sync. As said: it worked fine until ~ 4 weeks ago. No clue where to debug.
Comment 9 Grósz Dániel 2023-09-09 15:29:18 UTC
Yes, there seems to be a new bug since a few days or weeks ago.
Comment 10 Peter Ries 2023-09-14 14:58:07 UTC
unfortunately not fixed in 23.08.01 which came out today
Comment 11 Grósz Dániel 2023-09-14 17:20:15 UTC
@Jack, @Peter Ries: Note that these recent issues are likely to be Bug 473897. Idk if this Bug 357819 was related.
Comment 12 Jack 2024-06-19 17:49:01 UTC
Con no longer explicitly confirm.  Perhaps time to close and let someone reopen if it still occurs with KDE6?
Comment 13 Peter 2024-07-17 11:35:54 UTC
I am still having this problem:  events created in Google Calendar will appear in KOrganizer, but not the other way around (which is the more important for me).   This functionality once worked for me, possibly a couple of years ago, and certainly more recently than when this bug report was first raised.  Not working now, though.  

KOrganizer 6.1.2 (24.05.2)
Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.0
Kernel Version: 6.5.0-44-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: Dell Inc.
Product Name: XPS 13 9305
Comment 14 Rick 2025-01-13 21:04:00 UTC
Unfortunately, this issue persist today in KOrganizer version 6.3.1 (24.12.1) on Fedora Linux. If it cannot be fixed soon, then I'd say it's better to just remove Google Calendar support altogether.
Comment 15 Jack 2025-01-13 21:36:59 UTC
I'm not currently having this problem, but I won't say KOrganizer interactions with Google are always smooth.  To me, the real problem is the occasional inconsistent behavior.  I don't know if it would be worth the effort of using gdb and/or wireshark during both successful and unsuccesful creation of events.
Comment 16 Peter 2025-01-14 11:01:25 UTC
Hi Rick, Jack, 

Prompted by your comments, I checked the behaviour of my KOrganizer again, particularly given there have been updates since the bug was reported.  What I found was even stranger.  

I found that I could create an event in my KOrganizer Personal Calendar, and it does not appear in my Google Calendar.  However, if, in KOrganizer, I change the Calendar to a calendar created under my Google account email address then it does.  However, it seems intermittent: it seems as if it was working if I tried to create the new event in KOrganozer in some of my Google calendars but not others, i.e. the event would be created in KOrganizer, but might or might not appear in my Google Calendar (when viewed using the Google Calendar app).  Then it seemed to stop working altogether.  This morning it's working again, but I'm half expecting it to stop again.  

Questions that occur to me are: 
(1) Are entries in the KOrganizer Personal Calendar not supposed to be synchronised with Google Calendar?  I think it used to do this.  
(2) What diagnostics can we use to get to the bottom of the problem.  

Also, unless I'm mistaken, the first time I tried changing the calendar, I got the message, "You are not the organiser of this event. Editing it will bring your calendar out of sync with the organiser's calendar. Do you really want to edit it?", which was odd,  given I had created the event.  I only got this message once, though.   

Regards
Comment 17 Allen Winter 2025-01-14 12:45:40 UTC
Personal Calendars are completely separate from Google Calendars.
Personal Calendars on stored on your local drive.

To add Google Calendars:
- select Configure->KOrganizer menu
- in the General settings page, you'll see a Calendars tab. open that
- select Add and choose Google Groupware
 - configure
  you should see a web browser page open that makes you sign into your Google account
  and you need to ensure giving permission to Akonadi services.  and save those settings

For those of you having problems with existing Google calendars you might try
 - removing the existing one and starting from scratch
 - modify the existing one -> you should be taken immediately the Google account login page
   and then the 3rdparty permissions.  

also, look in the calendar browser in the lower left corner and ensure the Google calendars are selected
else they won't be available to you.
Comment 18 Jack 2025-01-14 13:20:40 UTC
Is it possible it matters whether or not you are logged into Google through a browser at the time of use?  I would not think it should, but I'm well aware Google doesn't care what I think.
Comment 19 Peter 2025-01-14 14:35:37 UTC
(In reply to Allen Winter from comment #17)
> Personal Calendars are completely separate from Google Calendars.
> Personal Calendars on stored on your local drive.
> 
> To add Google Calendars:
> - select Configure->KOrganizer menu
> - in the General settings page, you'll see a Calendars tab. open that
> - select Add and choose Google Groupware
>  - configure
>   you should see a web browser page open that makes you sign into your
> Google account
>   and you need to ensure giving permission to Akonadi services.  and save
> those settings
> 
> For those of you having problems with existing Google calendars you might try
>  - removing the existing one and starting from scratch
>  - modify the existing one -> you should be taken immediately the Google
> account login page
>    and then the 3rdparty permissions.  
> 
> also, look in the calendar browser in the lower left corner and ensure the
> Google calendars are selected
> else they won't be available to you.

Allen, 

Thank you for comment.  I can understand that the Personal Calendar is stored locally, but the Google Calendar is stored remotely.  Is the idea not that events in the Personal Calendar can be synchronised with the Google Calendar, so that they can be seen by other devices that access the Google Calendar?  Certainly, this is how I would like it to work, and my recollection is that this is how it used to work.   

I have previously removed the Google Calendar from KOrganizer and
Comment 20 Peter 2025-01-14 14:43:50 UTC
(In reply to Peter from comment #19)
> (In reply to Allen Winter from comment #17)
> > Personal Calendars are completely separate from Google Calendars.
> > Personal Calendars on stored on your local drive.
> > 
> > To add Google Calendars:
> > - select Configure->KOrganizer menu
> > - in the General settings page, you'll see a Calendars tab. open that
> > - select Add and choose Google Groupware
> >  - configure
> >   you should see a web browser page open that makes you sign into your
> > Google account
> >   and you need to ensure giving permission to Akonadi services.  and save
> > those settings
> > 
> > For those of you having problems with existing Google calendars you might try
> >  - removing the existing one and starting from scratch
> >  - modify the existing one -> you should be taken immediately the Google
> > account login page
> >    and then the 3rdparty permissions.  
> > 
> > also, look in the calendar browser in the lower left corner and ensure the
> > Google calendars are selected
> > else they won't be available to you.
> 
> Allen, 
> 
> Thank you for comment.  I can understand that the Personal Calendar is
> stored locally, but the Google Calendar is stored remotely.  Is the idea not
> that events in the Personal Calendar can be synchronised with the Google
> Calendar, so that they can be seen by other devices that access the Google
> Calendar?  Certainly, this is how I would like it to work, and my
> recollection is that this is how it used to work.   
> 
> I have previously removed the Google Calendar from KOrganizer and ...

- Oops hit the 'Save Changes' button - and reinstated it, but without success.  

And the latest oddity is that I have events in KOrganizer which have been added by my accept a meeting invite.  Even if these are in one of the Google Calendar calendars, they don't appear in Google Calendar.  In contrast, I can add an event in the same Google Calendar calendar, and it does show up in Google Calendar.  Why the difference?!

I will apologise for my lack of knowledge in this area, but is there not a systematic way of troubleshooting these problems, beyond the Microsoft switch-it-off-and-switch-it-back-on-again approach?  

Thanks and regards
Comment 21 Grósz Dániel 2025-01-14 15:17:40 UTC
(In reply to Peter from comment #19)
> Thank you for comment.  I can understand that the Personal Calendar is
> stored locally, but the Google Calendar is stored remotely.  Is the idea not
> that events in the Personal Calendar can be synchronised with the Google
> Calendar, so that they can be seen by other devices that access the Google
> Calendar?

Not that I know of, if you want it to be synchronized across devices, you have to add events to the Google Calendar directly from KOrganizer.