Thanks for the logs!
@mzenker said in Problems syncing past events:
- DavDroid finds 320 entries, but in fact there are more than 900 on the server.
In the logs you can not only see what DAVdroid finds, but what the server sends. Have a look after this query:
2017-11-02 18:34:34 1 [syncadapter.SyncManager] Listing remote resources
2017-11-02 18:34:34 1 [HttpClient] --> REPORT http://automatix:5005/homes/matthias/.kalender/matthias/
2017-11-02 18:34:34 1 [HttpClient] Content-Type: application/xml; charset=utf-8
2017-11-02 18:34:34 1 [HttpClient] Content-Length: 269
2017-11-02 18:34:34 1 [HttpClient] Depth: 1
2017-11-02 18:34:34 1 [HttpClient]
2017-11-02 18:34:34 1 [HttpClient] <?xml version='1.0' encoding='UTF-8' ?><CAL:calendar-query xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav"><prop><getetag /></prop><CAL:filter><CAL:comp-filter name="VCALENDAR"><CAL:comp-filter name="VEVENT" /></CAL:comp-filter></CAL:filter></CAL:calendar-query>
2017-11-02 18:34:34 1 [HttpClient] --> END REPORT (269-byte body)
How many <D:href>
elements are there? This is how many entries are sent by the server. By the way, there are .ics files which contain more than one VEVENT:
2017-11-02 18:35:30 1 [syncadapter.CalendarSyncManager] Received VCALENDAR with not exactly one VEVENT with UID, but without RECURRENCE-ID; ignoring ca910d4d-5e5d-4acc-9666-e1ee9f8ba0ba.ics
This is not allowed in CalDAV for good reasons, and I guess this is why you are missing events. Please fix your .ics files / your server:
Calendar object resources contained in calendar collections MUST NOT contain more than one type of calendar component (e.g., VEVENT, VTODO, VJOURNAL, VFREEBUSY, etc.) with the exception of VTIMEZONE components, which MUST be specified for each unique TZID parameter value specified in the iCalendar object.
—
- There are events in the log which are from the time period which does not appear on the mobile phone calender (before 2016). So they seem to be processed somehow, but do not make it to the mobile calendar.
Can you please provide the matching sections in the logs?
—
Additionally, I have noticed that series events are not synced correctly. I assume that this happens when single events of the series having been deleted by the user.
Please verify that your .ics files are correct. If you think there’s a specific problem, post the full .ics file here. Did you have a look at https://www.davdroid.com/faq/recurring-events/ (especially regarding https://forums.bitfire.at/topic/1238/synching-and-deleting-single-events-from-recurrent-repeating-events)?