Doesn't sync with davical



  • Carddav-sync and acal work, but davdroid don’t, so i think it’s not (only) a davical issue


  • developer

    I can’t decide that. I have seen many servers that answer incorrectly to requests and DAVdroid tries to use CalDAV/CardDAV in an efficient way, so maybe your Davical isn’t prepared for these requests. As you can see in the logs, the server does respond with status code 200, but without content to the multiget request, so I’m convinced that there’s something wrong with DAVical. Maybe it’s also the fault of DAVdroid because it sends an invalid request, but the server behaviour is very strange and shouldn’t be.
    Another indication is that my tests with Davical were OK, so this behaviour seems to be related to what is stored in the DAVical account – and that’s not a DAVdroid problem.
    I don’t want to whitewash possibly existing DAVdroid bugs, but I’m interested in a standards-compliant DAV client that works. So whatever the problem is, we should find it 😉



  • I sent you credentials of my real account, so that you can test


  • developer



  • having the same problem with davical 1.1.1



  • and like it was said on my other davical server it works well, but after adding some more records into collection it broke as well with not putting anything with multistatus



  • ok, figured that out, if there is more that one element to update, it won’t return you any data in multiget


  • developer

    @khades Yes, please see the posting in the mailing list I have linked above. If you have any suggestions why this problem occurs, please post here (or there if it’s DAViCal-related – I think it is).



  • can you please tell how you did send multiget request with curl? cant make it work with xml you provided in davical-general.


  • developer

    @khades curl --data @request.xml --user name:passwd -H "Content-Type: application/xml" -X REPORT https://server/path/to/collection/
    (put the multiget request from the list into request.xml)



  • fast kinda fix
    if ( empty($properties) ) $properties[‘DAV::allprop’] = 1;
    changed in
    $properties[‘DAV::allprop’] = 1;

    in caldav-REPORT-multiget.php of davical
    now it returns etags, but not data. It wasnt returning even etag.

    11-14 18:06:41.765: INFO/davdroid.RemoteCollection(15582): Getting resource: 8076225d-6736-4796-a5e1-74c5ec748c6f.ics with etag “bfe66a1f996217e29d1e0deb5d7a012d” with type null
    11-14 18:06:41.767: ERROR/davdroid.RemoteCollection(15582): Ignoring entity without content
    11-14 18:06:41.767: INFO/davdroid.RemoteCollection(15582): Getting resource: 724628d1-9099-4fe4-8c11-36410040bcf2.ics with etag “b1bcd0e57798813104d9469bcc918534” with type null
    11-14 18:06:41.767: ERROR/davdroid.RemoteCollection(15582): Ignoring entity without content
    11-14 18:06:41.770: INFO/davdroid.RemoteCollection(15582): Getting resource: c23ca5e4-37f2-4e75-b546-3bde66037ef2.ics with etag “f1b56b8eb8bb7c3a66b8825612ce8c66” with type null
    11-14 18:06:41.771: ERROR/davdroid.RemoteCollection(15582): Ignoring entity without content

    (i added some more output logging)

    now there’s other problem, what is actual bugtracker of davical? i know there’s davical development on git, and you posted to sourceforge

    so there’s problems in properties query.

    Does davdroid query for specific properties?



  • [DAV::href] => 1
    is in that properties, so it doesnt add allprop



  • riiiight. it is davdroid problems probably, it should request for DAV::getetag and urn:ietf:params:xml:ns:caldav:calendar-data

    i added kinda cludge

    i added in caldav-REPORT-multiget.php

    if (( count($properties) == 1) && ( $properties[‘DAV::href’] == 1)) {
    $properties[‘DAV::getetag’] = 1;
    $properties[‘urn:ietf:params:xml:ns:caldav:calendar-data’]=1;
    }

    after
    if ( empty($properties) ) $properties[‘DAV::allprop’] = 1;

    and it worked.



  • that props i got from thunderbird\sunbird query


  • developer

    So where’s the problem? DAVdroid requests DAV:getetag and CALDAV:calendar-data / CARDDAV:addressbook-data. Can you give me a hint?



  • it doesnt request any of CALDAV:calendar-data / CARDDAV:addressbook-data, i checked that adding logs in caldav-REPORT-multiget.php

    $fd = fopen("/tmp/php-davical", “a”);
    // write string
    fwrite($fd, print_r($properties, true)."\n");
    // close file
    fclose($fd);

    before

    if ( empty($properties) ) $properties[‘DAV::allprop’] = 1;

    and it did shown me that nothing was requesting except href


  • developer

    DAVdroid does request getetag and calendar-data/addressbook-data, but maybe DAViCal doesn’t understand the request and thinks that nothing of it was requested? Or please give me hint what could be wrong in the request.



  • how to log what xml and type of request is made in davdroid? in what class does it generate?


  • developer

    The adb logcat with tag “davdroid” shows generated requests (they’re logged). The multiget request is created https://github.com/rfc2822/davdroid/blob/8e8bc1c7722fffae3dbd2a6e8bcb30af98c6c1c2/src/at/bitfire/davdroid/webdav/WebDavResource.java#L283 here (but of course other classes are involved/referenced).

    In line 290/292 you can see how the addressData/calendarData prop is set for the request.


  • developer

    @khades Can you please try to put the <href>s after the <prop> in the request (with curl again) and check if it works for you?


Log in to reply
 

Similar topics

  • 14
  • 5
  • 2