Internal server error for events without end date



  • Hello,
    I try DAVdroid and in some cases stops sync with error. I try with different types of events and discover that DAVdroid seems not supporting an event without ending date.
    Does some have the same problem? Know how to solve it?
    Best regards,
    Thomas



  • Sorry, I forget to give a bit more info :

    SYNCHRONIZATION INFO
    Synchronization phase: 7
    Account name: testing
    Authority: com.android.calendar
    
    HTTP REQUEST:
    REPORT /cdav/server.php/calendars/user/1-cal-user/
    Content-Length: 328
    Content-Type: application/xml; charset=utf-8
    Depth: 1
    
    <?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:time-range start="20160629T150123Z" /></CAL:comp-filter></CAL:comp-filter></CAL:filter></CAL:calendar-query>
    
    HTTP RESPONSE:
    http/1.1 500 Internal Server Error
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Connection: close
    Content-Length: 257
    Content-Type: application/xml; charset=utf-8
    Date: Tue, 27 Sep 2016 13:01:48 GMT
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Pragma: no-cache
    Server: Apache/2.2.22 (Debian)
    X-Sabre-Version: 3.0.8
    
    <?xml version="1.0" encoding="utf-8"?>[LF]
    <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">[LF]
      <s:sabredav-version>3.0.8</s:sabredav-version>[LF]
      <s:exception>ErrorException</s:exception>[LF]
      <s:message>Uninitialized string offset: 0</s:message>[LF]
    </d:error>[LF]
    
    
    EXCEPTION:
    at.bitfire.dav4android.exception.HttpException: 500 Internal Server Error
    	at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:316)
    	at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:289)
    	at at.bitfire.dav4android.DavCalendar.calendarQuery(DavCalendar.java:88)
    	at at.bitfire.davdroid.syncadapter.CalendarSyncManager.listRemote(CalendarSyncManager.java:126)
    	at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.java:161)
    	at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$SyncAdapter.onPerformSync(CalendarsSyncAdapterService.java:69)
    	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
    
    SOFTWARE INFORMATION
    DAVdroid version: 1.2 (109) Sun Jul 03 15:15:13 UTC+02:00 2016
    Installed from: org.fdroid.fdroid
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: automatically
    Account: testing
      Address book sync. interval: 240 min
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: —
      Preemptive auth: true
      WiFi only: false
      [CardDAV] Contact group method: GROUP_VCARDS
                RFC 6868 encoding: true
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  fr_FR |
    ----------
    settings
    	|  setting | value |
    	|  hint_OpenTasksNotInstalled | 0 |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  13 | testing | carddav | https://my.server.com/cdav/server.php/principals/user/ |
    	|  14 | testing | caldav | https://my.server.com/cdav/server.php/principals/user/ |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 14 |
    	|  collections | 38 |
    	|  homesets | 24 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  22 | 13 | https://my.server.com/cdav/server.php/addressbooks/user/ |
    	|  24 | 14 | https://my.server.com/cdav/server.php/calendars/user/ |
    ----------
    collections
    	|  _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
    	|  33 | 13 | https://my.server.com/cdav/server.php/addressbooks/user/default/ | 0 | Dolibarr | Contacts Dolibarr user | <null> | <null> | <null> | <null> | 0 |
    	|  38 | 14 | https://my.server.com/cdav/server.php/calendars/user/1-cal-user/ | 0 | user | SuperAdmin | <null> | <null> | 1 | 1 | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 4.2.2 (JDQ39.S7275RXXUAOJ1)
    Device: Samsung GT-S7275R (loganrelte)
    

  • developer

    Hello,

    As you can see, this is an internal server error:

    http/1.1 500 Internal Server Error
    
    <?xml version="1.0" encoding="utf-8"?>[LF]
    <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">[LF]
      <s:sabredav-version>3.0.8</s:sabredav-version>[LF]
      <s:exception>ErrorException</s:exception>[LF]
      <s:message>Uninitialized string offset: 0</s:message>[LF]
    </d:error>[LF]
    

    Please contact your server vendor; it's not a DAVdroid problem.



  • Hello,
    that's what I though first, but I made this test :

    • new calendar, single event without ending date
      -> sync is ok with Thunderbird/SoGo
      -> sync error with DAVdroid. Error message from this test is the one in my second post
    • same calendar, edit this single event by adding ending date
      -> sync is ok with Thunderbird/SoGo
      -> sync is ok with DAVdroid

    How investigate more? HTTP flow should help, maybe... I can capture it with wireshark.
    Thanks a lot.
    Thomas


  • developer

    @esprit-libre Thunderbird probably doesn't use the same REPORT calendar-query request, so that the server error (which occurs when the server tries to process the events in order to process the REPORT calendar-query request) doesn't occur.

    You can create a new calendar, upload a single event, and then have a look whether the problem occurs. If it does, you have a look at the uploaded event, and the current event in the server's database.

    However, it's clearly a server problem, so I suggest to report it to the server vendor and continue discussion there. Which server do you use?

    BTW: Android doesn't support events without end dates. All-day events will become assigned end := start + 1 day, the other events end := start.


Log in to reply
 

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