Problems syncing past events



  • Hi,
    I am setting up a synchronization between a webdav/caldav server on a synology NAS, Mozilla thunderbird and a Samsung S5. I have installed DAVdroid on the S5, copied my local calendar to the DAVdroid account and done a sync. All my events (back to 2011) are on the server now, I can see them from thunderbird. But on the next sync, DAVdroid removed all events before 2015 from the S5 calendar. I have set the number of days to none or to 3000, it doesn't change the behaviour. What am I doing wrong?
    Thanks for a hint,
    Matthias


  • developer

    @mzenker Probably a server problem. DAVdroid sends the number of days in the past to the server, which then returns the events.

    If you need more information, please have a look at the verbose DAVdroid logs as described in [READ BEFORE POSTING] What's required to diagnose a problem.



  • Thank you for the quick reply. If it is a server problem, I wonder why thunderbird was able to get the full data from the server.
    I will do a new synchronization with log and report back.


  • developer

    @mzenker said in Problems syncing past events:

    Thank you for the quick reply. If it is a server problem, I wonder why thunderbird was able to get the full data from the server.

    Maybe Thunderbird doesn't use REPORT calendar-query, but PROPFIND. Without logs, we won't know.



  • Hi,

    I have pasted my log here. I have (hopefully) removed all private and repetitive parts. I have noticed two things:

    • DavDroid finds 320 entries, but in fact there are more than 900 on the server.
    • 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.

    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.

    I would be grateful if this problems could be solved. I am investigating setting up a family calendar, so there would be 3 more DAVdroid licenses if it works reliably and correctly for me... ;)

    Matthias


  • developer

    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)?



  • @rfc2822
    Sorry, I have put this problem aside for a while and then found another way to set up the whole thing which seems to work so far. I just want to report it here in case someone else has the same kind of problem:
    Reminder: The goal is to transfer the Androif calendar to the synology WebDav/CalDav server and access it with thunderbird and the mobile phone.
    This is what I did after the first attempt failed due to old events being deleted upon DavDroid syncs:

    • delete the calendar on the caldav server
    • export Android calendar as ics (using "ical import/export" App)
    • import the exported ics to thunderbird
    • let thunderbird do the initial sync with the caldav server
    • set up a new DavDroid account and sync
      Now it doesn't delete the old events any more (so far ;) ).
      So I suspect that the initial DavDroid sync, when the whole calendar had to be transferred to the server, somehow resulted in problems for subsequent syncing. Anyhow, problem solved, DavDroid syncs are now OK.

    Best regards,

    Matthias


  • admin

    Thank you for the update! What should be also possible is to create a calendar from within DAVdroid - if the server supports it. I think Synology does and stores the created calendar correctly. Then export and import the events directly into the new calendar.

    Anyway - good that it now works for you. :grinning:


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.