Bug 349581 - Akonadi DAV Resource does not sync all calendars (at least on Communigate or ownCloud)
Summary: Akonadi DAV Resource does not sync all calendars (at least on Communigate or ...
Status: RESOLVED NOT A BUG
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: DAV Resource (show other bugs)
Version: 1.13.0
Platform: Gentoo Packages Linux
: NOR grave
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-24 20:18 UTC by Tim Eberhardt
Modified: 2015-12-02 18:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Akonadi Console ⇒ Debugger tab ⇒ Dav Groupware tab (691.01 KB, application/rtf)
2015-07-17 21:40 UTC, Matija Šuklje
Details
Akonadi Console ⇒ Job Tracker tab (15.97 KB, text/plain)
2015-07-17 21:41 UTC, Matija Šuklje
Details
console output of `akonadictl restart` (186.47 KB, text/plain)
2015-07-17 21:41 UTC, Matija Šuklje
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Eberhardt 2015-06-24 20:18:49 UTC
My work calendars are on a Communigate Pro groupware server. While my private Owncloud based calendar is working, Akonadi does not sync my work calendars. I have deleted all accounts and re-added them with no success. Akonadi say it is synchronizing but no events are loaded or show up in Kontact. When I check with akonadi console the resource is empty.

Versions: akonadi 1.13.0, Kontact 4.14.8, Gentoo.
On another computer I have Ubuntu 14.04 and Kontact 4.13 and the calendar is working. 

Reproducible: Always

Steps to Reproduce:
1. Add Communigate Pro based CalDAV resource
2. Try to sync and view events

Actual Results:  
No events are synced

Expected Results:  
Events should be synced and show up in Kontact/Korganizer
Comment 1 Tim Eberhardt 2015-06-25 18:11:37 UTC
I have to correct my statement from above. My Ubuntu installation seems to have a problem with these calendars too. I added some events yesterday with Kontact and today on another PC with Thunderbird all theses events are gone. Adding events in Thunderbird or on Android is working fine.
Can I provide debug info somehow?
Comment 2 Matija Šuklje 2015-07-17 21:38:01 UTC
I can confirm this bug.

What happens is that every now and again, one or several of the calendars (and/or contacts) resources on ownCloud stop syncing with Akonadi. Since the sync works fine with my Jolla phone, I suspect the issue is on KDE’s side.

How this looks in practice is that suddenly and without warning items from some calendars are missing in KOrganizer, Zanshin, EventList and even Akonadi Console.

What I already tried to do, that before worked, but since the latest update doesn’t:
 • in Akonadi Console: toggle offline; abort activity; restart resource; toggle online
 • in Akonadi Console: restart Akonadi server
 • in Akonadi Console: clone the WebDAV resource and remove the old one
 • in Akonadi Console: just remove the old one and create a new one manually
 • restarting KDE/X
 • restarting the computer (yes, I’m getting desperate!)
 • created a fresh new user on my laptop with a clean new home and added my ownCloud as a new CalDAV resource

…all to no avail.

The events don’t show in the Akonadi Console.

The current state that I can see in Akonadi Console ↦ Browser is that:
 •      Contacts shows 673 entries (seems correct)
 •      “Dogodki” calendar shows 17 entries (seems correct)
 •      “Faks” calendar shows no entries and 0 size (**FALSE**)
 •      “FSFE” calendar shows 579 entries (seems correct)
 •      “Osebno” calendar shows no entries and 0 size (**FALSE!**)
 •      Rojstni dan/Birthdays show 14 entries

The only thing that I can think of as special for the two non-syncing calendars is that I renamed them at some point (Študij ⇒ Faks; Opravki ⇒ Osebno) and in the backend they are still called the old name. But this was long long before this bug happened and it works fine with the Jolla Sailfish calendar app.

My setup:
Mageia 5 (stable); x86_64
Akonadi 1.13.0-4
KDE: 4.14.5
KOrganizer: 4.14.5-1
ownCloud: 8.0.4


I suspect this could be related to: https://bugs.kde.org/show_bug.cgi?id=328734
Comment 3 Matija Šuklje 2015-07-17 21:40:00 UTC
Created attachment 93630 [details]
Akonadi Console ⇒ Debugger tab ⇒ Dav Groupware tab
Comment 4 Matija Šuklje 2015-07-17 21:41:01 UTC
Created attachment 93631 [details]
Akonadi Console ⇒ Job Tracker tab
Comment 5 Matija Šuklje 2015-07-17 21:41:43 UTC
Created attachment 93632 [details]
console output of `akonadictl restart`
Comment 6 Matija Šuklje 2015-07-17 21:43:42 UTC
I’m bumping the severity of this bug to “grave”, because we *are* talking about data loss (at least on the KDE side) and effectively making CalDAV unusable on KDE.
Comment 7 Tim Eberhardt 2015-07-18 18:38:25 UTC
Since this week I got a new laptop for work. This time I installed newest Ubuntu 15.04 and I have the same behaviour there. So I can confirm, that this bug is present in Ubuntu 14.04, 15.04 and Gentoo/Funtoo (normal ~amd64 + newest ebuilds from KDE overlay).

This bug could also be related I think, even if saving new events does not always work for me either, the rest seems to be quite similar:
https://bugs.kde.org/show_bug.cgi?id=325224
Comment 8 Matija Šuklje 2015-08-06 17:56:56 UTC
Confirmed at Akademy, when dvratil (added in CC now) looked at my laptop and tried to figure out what’s the cause.
Comment 9 Grégory Oestreicher 2015-08-19 19:51:24 UTC
(In reply to Matija Šuklje from comment #8)
> Confirmed at Akademy, when dvratil (added in CC now) looked at my laptop and
> tried to figure out what’s the cause.

For owncloud: are the disappearing events older than 3 months per chance? There was a limit enforced and hard coded to prevent requesting too much data from the server. In the current development branch there's a UI in the configuration dialog to make this limit configurable.
Comment 10 Grégory Oestreicher 2015-08-19 20:05:30 UTC
(In reply to Tim Eberhardt from comment #0)
> My work calendars are on a Communigate Pro groupware server. 

I've tried to use the demo that Communigate offers but it's not working (as in: I can't get to know the password for the anonymous test user that gets generated).

Searching a bit I could find the CalDav setup doc and this raises one question: which URL did you use to configure your calendars?
Comment 11 Tim Eberhardt 2015-08-20 08:32:16 UTC
On all devices (Android, Thunderbird, Kontact) and for a couple of years now I'm using this URL:

https://groupware.tu-braunschweig.de/CalDAV/

where multiple calendars are stored. I don't think it's a setup problem, because Kontact is the only application that has problems for some time now (it used to work before).
Under the akonadi resource preferences I can see all CalDAV collections und this /CalDAV/ URL.
Comment 12 Tim Eberhardt 2015-08-20 08:42:40 UTC
I forgot to mention:

Saving new Events is working most of the time, but after the next sync they are not displayed anymore in Kontact (but present on the server). I could not reproduce the behaviour of Comment #1 again where saving did not even work.
Comment 13 Grégory Oestreicher 2015-08-20 20:00:14 UTC
So I installed a Communigate test server to see what the problem is. The bad news is that it's not in the resource so there's nothing that I can do. Communigate doesn't interpret correctly (i.e. always returns an empty list) a calendar-query REPORT that contains a time-range, which other servers do fine.

The good news is that for the next stable release (the one coming after Applications/15.08) you'll have a workaround: you will need to disable the synchronization range limit from the configuration dialog. This is not available in the current stable release due to translation freeze constraints and me not being in a position to deliver on time.

Matija, for ownCloud can you check if it's not the same issue as in https://bugs.kde.org/show_bug.cgi?id=339449 and open another report if that's not the case?
Comment 14 Tim Eberhardt 2015-08-21 09:26:50 UTC
Hm... that's really bad news, because it renders Kontact unusable and I and some of my colleagues have to switch to Thunderbird.
Is that query by time range a feature that was introduced some months ago in Akonadi? Because it used to work for years now and suddenly stopped working while all other clients are still working (at least Android, iOS, Thunderbird)! This is why it's hard to imagine that it should be only Communigates fault.
Comment 15 Grégory Oestreicher 2015-08-21 09:41:01 UTC
(In reply to Tim Eberhardt from comment #14)
> Hm... that's really bad news, because it renders Kontact unusable and I and
> some of my colleagues have to switch to Thunderbird.

Well, there's still the good new that it will work (confirmed here) with the stable release coming after Applications/15.08.

> Is that query by time range a feature that was introduced some months ago in
> Akonadi?

Yes, this was added to lower the server load when retrieving big calendars for which sync would often fail.

> Because it used to work for years now and suddenly stopped working
> while all other clients are still working (at least Android, iOS,
> Thunderbird)!

I took a look at Thunderbird source and they're using a PROPFIND to list all items in the calendar while the resource uses a calendar-query REPORT (this is due to some design constraints where the resource has to know the item mime-type ahead of time). Both methods are valid.

> This is why it's hard to imagine that it should be only
> Communigates fault.

Well, it's the resource "fault" to use a calendar-query REPORT to list items for certain types if you want to go this way. But adding in the time-range just showed that Communigate doesn't support this. Maybe you can report this bug to this product support team.
Comment 16 Tim Eberhardt 2015-08-21 10:03:42 UTC
(In reply to Grégory Oestreicher from comment #15)
> Well, it's the resource "fault" to use a calendar-query REPORT to list items
> for certain types if you want to go this way. But adding in the time-range
> just showed that Communigate doesn't support this. Maybe you can report this
> bug to this product support team.

Not my intention to blame anyone! I will try if our data center staff can submit this as a bug report to Communigate. Thanks a lot!
Comment 17 Matija Šuklje 2015-08-22 21:09:23 UTC
(In reply to Grégory Oestreicher from comment #13)
> Matija, for ownCloud can you check if it's not the same issue as in
> https://bugs.kde.org/show_bug.cgi?id=339449 and open another report if
> that's not the case?

It is not. None of the events are shown. Even if I create a new event via the ownCloud webGUI, Akonadi doesn’t show any events.

I reopened the bug here: https://bugs.kde.org/show_bug.cgi?id=351628
Comment 18 Tim Eberhardt 2015-12-02 18:15:21 UTC
Just to inform those that may be interested in the Communigate issue. The bug was reported by me to Stalker Software and fixed in v6.1.7 of CommunigatePro.