HTTP Error 500 on synchronizing a shared calendar



  • Problem description:
    My account is account1 and I have read-write access to a calendar in account2. Server is using owncloud version Portknox 8.2.2 (git).
    I am not able to access the events of that calendar. However, the user of account2 has no problems using their calendar.
    I am also able to create appointments on that calendar using Evolution 3.18.5.2.

    SYNCHRONIZATION INFO
    Synchronization phase: 7
    Account name: account1
    Authority: com.android.calendar
    
    HTTP REQUEST:
    REPORT /remote.php/caldav/calendars/malaverdiere/defaultcalendar_shared_by_swapna/
    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="20160112T061151Z" /></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: keep-alive
    Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
    Content-Type: application/xml; charset=utf-8
    Date: Mon, 11 Apr 2016 10:13:09 GMT
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    OkHttp-Received-Millis: 1460369512326
    OkHttp-Sent-Millis: 1460369511975
    Pragma: no-cache
    Server: nginx
    Transfer-Encoding: chunked
    X-Content-Type-Options: nosniff
    X-Frame-Options: Sameorigin
    X-Robots-Tag: none
    X-Sabre-Version: 2.1.7
    X-XSS-Protection: 1; mode=block
    
    <?xml version="1.0" encoding="utf-8"?>[LF]
    <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">[LF]
      <s:sabredav-version>2.1.7</s:sabredav-version>[LF]
      <s:exception>Sabre\VObject\EofException</s:exception>[LF]
      <s:message>End of document reached prematurely</s:message>[LF]
    </d:error>[LF]
    
    
    EXCEPTION:
    at.bitfire.dav4android.exception.HttpException: 500 Internal Server Error
            at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:317)
            at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:290)
            at at.bitfire.dav4android.DavCalendar.calendarQuery(DavCalendar.java:88)
            at at.bitfire.davdroid.syncadapter.CalendarSyncManager.listRemote(CalendarSyncManager.java:117)
            at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.java:159)
            at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$SyncAdapter.onPerformSync(CalendarsSyncAdapterService.java:69)
            at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
    
    SOFTWARE INFORMATION
    DAVdroid version: 1.0.6 (96) Fri Apr 08 03:25:34 EDT 2016
    Installed from: org.fdroid.fdroid
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: automatically
    Account: malaverdiere
      Address book sync. interval: 240 min
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: manually
    
    SQLITE DUMP
    android_metadata
            |  locale |
            |  en_CA |
    ----------
    settings
            |  setting | value |
    ----------
    services
            |  _id | accountName | service | principal |
            |  1 | account1 | carddav | <null> |
            |  2 | account1 | caldav | <null> |
    ----------
    sqlite_sequence
            |  name | seq |
            |  services | 2 |
            |  collections | 14 |
            |  homesets | 4 |
    ----------
    homesets
            |  _id | serviceID | url |
            |  3 | 1 | https://redacted.portknox.net/remote.php/carddav/addressbooks/account1/ |
            |  4 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/ |
    ----------
    collections
            |  _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
            |  8 | 1 | https://redacted.portknox.net/remote.php/carddav/addressbooks/account1/contacts/ | 0 | Contacts | <null> | <null> | <null> | <null> | <null> | 1 |
            |  9 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/ngo/ | 0 | NGO | <null> | -8355840 | <null> | 1 | 1 | 1 |
            |  10 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/contact_birthdays/ | 0 | Contact birthdays | <null> | -3355444 | <null> | 1 | 0 | 1 |
            |  11 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/defaultcalendar/ | 0 | Personal | <null> | -6306073 | <null> | 1 | 1 | 1 |
            |  12 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/defaultcalendar_shared_by_account2/ | 0 | Swapna | <null> | -1146130 | <null> | 1 | 1 | 1 |
            |  13 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/job/ | 0 | Job | <null> | -4989844 | <null> | 1 | 1 | 1 |
            |  14 | 2 | https://redacted.portknox.net/remote.php/caldav/calendars/account1/school/ | 0 | School | <null> | -65536 | <null> | 1 | 1 | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 6.0.1 (RR_mako-rodman01 6.0.1 MHC19J)
    Device: LGE Nexus 4 (mako)
    

  • developer

    Hello,

    As you can see in the logs:

    http/1.1 500 Internal Server Error
    …
    <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">[LF]
      <s:sabredav-version>2.1.7</s:sabredav-version>[LF]
      <s:exception>Sabre\VObject\EofException</s:exception>[LF]
      <s:message>End of document reached prematurely</s:message>[LF]
    </d:error>[LF]
    

    This is a server error when listing the calendar entries. Please ask in the OwnCloud community.



  • Don’t know if it is any useful, but I got the exact same problem. Since there is at least one other thread with people reporting this since your version 1 I suspect it has something to do how DAVdroid gets its data? I never had any problems fetching owncloud-based calendars through DAVdroid, but since the rewamp I am constantly pestered with 500 error messages for one single calendar (out of four) which is a shared one as well. I actually have two shared calendars, one I am sharing (causing the 500 error) and one I am following (no errors). As long as I disable the shared calendar, all other calendars seem to sync well. I haven’t created any rogue calendar entries in the shared calendar, I even checked EVERY event I created on that calendar within the last few weeks, and there are none entries that had errors or signs of being corrupt.
    The strange thing really is, before your big update, everything went smoothly. Any ideas?


  • developer

    @ratzekind said:

    The strange thing really is, before your big update, everything went smoothly. Any ideas?

    Yes: The update brought new features (like not synchronizing all events, but only since 90 days in the past), and many servers seem to be broken.

    However, my personal strategy is to fix errors (or help fixing errors) where they occur in order to improve the whole ecosystem, instead of implementing hacky workarounds so that faulty servers don't need to be fixed for the next 10 years, until CalDAV/CardDAV finally dies because there are no usable servers and clients…

    Did you try to synchronize an empty shared calendar? If this works, you may try importing and synchronizing events in batches. Or maybe the OwnCloud logs can reveal the actual problem. Did you try to get OwnCloud support for that problem?


Log in to reply
 

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