Davdroid does not sync with memotoo



  • I can set up an account fine and davdroid finds the address book on the server but no contacts get synced. This issue has also been reported in the Memotoo forum. https://www.memotoo.com/gb/index.php?rub=forum

    I/davdroid.ContactsSyncAdapter(30694): httpClient = ch.boye.httpclientandroidlib.impl.client.InternalHttpClient@4200aa18
    I/davdroid.DavSyncAdapter(30694): Performing sync for authority com.android.contacts
    I/davdroid.ContactsSyncAdapter(30694): httpClient 2 = ch.boye.httpclientandroidlib.impl.client.InternalHttpClient@4200aa18
    D/davdroid.WebDavResource(30694): Using preemptive authentication (not compatible with Digest auth)
    I/davdroid.SyncManager(30694): Remotely removing 0 deleted resource(s) (if not changed)
    I/davdroid.SyncManager(30694): Uploading 0 new resource(s) (if not existing)
    I/davdroid.SyncManager(30694): Uploading 0 modified resource(s) (if not changed)
    I/davdroid.SyncManager(30694): Synchronization forced
    I/davdroid.SyncManager(30694): Fetching remote resource list
    D/davdroid.SNISocketFactory(30694): Setting SNI hostname
    I/davdroid.SNISocketFactory(30694): Established TLSv1 connection with sync.memotoo.com using SSL_RSA_WITH_RC4_128_SHA
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "PROPFIND /cardDAV/DoubtedEd/addressbook/ HTTP/1.1[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Depth: 1[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Content-Length: 134[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Host: sync.memotoo.com:443[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "User-Agent: DAVdroid/0.5.11-alpha[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "Authorization: Basic xxxxxxxxx[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "<propfind xmlns="DAV:">[\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "   <prop>[\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "      <CS:getctag xmlns:CS="http://calendarserver.org/ns/"/>[\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "      <getetag/>[\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "   </prop>[\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 >> "</propfind>"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "HTTP/1.1 207 Multi-Status[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Date: Mon, 31 Mar 2014 21:59:41 GMT[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Server: Apache/2.2[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Set-Cookie: PHPSESSID=54n6rklq0cun6ata36tkp9cuj3; path=/[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Expires: Thu, 19 Nov 1981 08:52:00 GMT[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Pragma: no-cache[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "X-Robots-Tag: noindex, nofollow[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "X-Dav-Powered-By: Memotoo DAV server[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "X-WebDAV-Status: 207 Multi-Status[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Vary: Accept-Encoding[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Content-Encoding: gzip[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Content-Length: 245[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Connection: close[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "Content-Type: text/xml; charset=UTF-8[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x3]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "UP[0xcb]j[0xc3]0[0x10][0xbc][0x17][0xfa][0xf]F[0xf7]z[0xad][0x4][0x9a]V[0xd8][0xe][0x1][0x15][\n]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "=[0xb4][0x87][0xd0][0xbb]bm[0x1c][0x13]ge[0xb4]r[0xe9][0xe7]W[0x8a][0x1d][0xdc][0xdc]vfgf[0x1f][0xe5][0xf6][0xf7][0xd2]g?[0xe8][0xb9]sT[0x9][0x99][0x17]"Cj[0x9c][0xed][0xa8][0xad][0xc4][0x18][0x8e]O/b[?>[0x94]Z][0xc6]>t[0x1c]L[0x18]9[0x8b]&b[0xa5]+[0xa1]w[0xdf]J[0xcc][0x90]XV[0xe2][0x14][0xc2][0xa0][0x0][0x1a][0xd3]#Y[0xe3][0x19]}[0xc][0xcf][0x9d]o[0x81][0x18][0xc4][0x94][0xe4][0x91][0x7]G[0x8c][0x13]:y<[0xd6][0xd1][0xe0]m[0xc][0x3][0xed][0xc6]C@[0xfb]f[0xc1]X[0x1b][0x85]|p[0xee][0xc]%[0xcc][0xba][0xab]c[0xf0]nH[0x8b],(Uq[0xbc]j14[0xc1][0xb4][0xb5][0xbf]>[0xaf][0xb][0xb9][0x91][0x9b][0x12][0xfe][0xf3]WC[0x4][0x98][0x80] G(R[0xf4][0x8d][0x89]mX[0x2][0xb5][0x9a][0xae][0xad][0xdf][0xf7][0xfb]/[0x90][0xb9][0xcc]VE[0x91]}~$[0xcd][0xdc]Y[0xc][0xb7]}[0xe0][0xfe]<[0xb8][0xfb][d[0xfe][0x0]"
    D/ch.boye.httpclientandroidlib.wire(30694): http-outgoing-0 << "_[0xeb][0xe5]aq[0x1][0x0][0x0]"
    D/davdroid.WebDavResource(30694): Processing multi-status element: https://sync.memotoo.com:443/cardDAV/DoubtedEd/addressbook/
    I/davdroid.SyncManager(30694): Fetching 0 new remote resource(s)
    I/davdroid.SyncManager(30694): Fetching 0 updated remote resource(s)
    I/davdroid.SyncManager(30694): Removing non-dirty resources that are not present remotely anymore
    D/davdroid.LocalCollection(30694): Committing 1 operations
    I/davdroid.SyncManager(30694): Sync complete, fetching new CTag
    E/dalvikvm(30767): /system/priv-app/DeskClock.apk odex has stale dependencies
    E/dalvikvm(30789): /system/framework/android.test.runner.jar odex has stale dependencies
    E/dalvikvm(30789): /system/priv-app/CalendarProvider.apk odex has stale dependencies
    E/dalvikvm(30842): /system/priv-app/Calendar.apk odex has stale dependencies
    E/MDMCTBK (  269): MdmCutbackHndler,Could not open ''
    

  • developer

    After cumbersome debugging, we found out that Memotoo's behaviour changes when the User-Agent "DAVdroid" is sent.

    $cat 1.xml
    <propfind xmlns="DAV:">
    	<prop>
    		<CS:getctag xmlns:CS="http://calendarserver.org/ns/"/>
    		<getetag/>
    	</prop>
    </propfind>
    
    $ curl -X PROPFIND -H 'Depth: 1' --user-agent "DAVdroid/0.5.11-alpha" -u xxxx:xxxx --data @1.xml https://sync.memotoo.com/cardDAV/xxxx/addressbook/
    <?xml version="1.0" encoding="utf-8"?>
    <D:multistatus xmlns:D="DAV:" xmlns:ns1="http://calendarserver.org/ns/">
    <D:response>
    <D:href>/cardDAV/xxxx/addressbook/</D:href>
    <D:propstat>
    <D:prop>
    <ns1:getctag>1396641510</ns1:getctag>
    <D:getetag>"none"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    </D:response>
    </D:multistatus>
    
    $ curl -X PROPFIND -H 'Depth: 1' --user-agent "AnotherClient" -u xxxxx:xxxxx --data @1.xml https://sync.memotoo.com/cardDAV/xxxx/addressbook/
    <?xml version="1.0" encoding="utf-8"?>
    <D:multistatus xmlns:D="DAV:" xmlns:ns1="http://calendarserver.org/ns/">
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/%5Btop%5D</D:href>
    <D:propstat>
    <D:prop>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    <D:getetag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/%5BAlle%5D</D:href>
    <D:propstat>
    <D:prop>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    <D:getetag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/Test</D:href>
    <D:propstat>
    <D:prop>
    <D:getetag>"contactGroup314724.vcf"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/contact31635120.vcf</D:href>
    <D:propstat>
    <D:prop>
    <D:getetag>"contact31635120.vcf"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/contact31635119.vcf</D:href>
    <D:propstat>
    <D:prop>
    <D:getetag>"contact31635119.vcf"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/contact31627310.vcf</D:href>
    <D:propstat>
    <D:prop>
    <D:getetag>"contact31627310.vcf"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/contact34068204.vcf</D:href>
    <D:propstat>
    <D:prop>
    <D:getetag>"contact34068204.vcf"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/contact34068205.vcf</D:href>
    <D:propstat>
    <D:prop>
    <D:getetag>"contact34068205.vcf"</D:getetag>
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    <D:propstat>
    <D:prop>
    <ns1:getctag />
    </D:prop>
    <D:status>HTTP/1.1 404 Not Found</D:status>
    </D:propstat>
    </D:response>
    <D:response>
    <D:href>https://sync.memotoo.com/cardDAV/addressbook/</D:href>
    <D:propstat>
    <D:prop>
    <ns1:getctag>1396641510</ns1:getctag>
    <D:getetag />
    </D:prop>
    <D:status>HTTP/1.1 200 OK</D:status>
    </D:propstat>
    </D:response>
    </D:multistatus>
    

    I will report this issue to MemoToo.


  • developer

    Found out that we have reported this issue to MemoToo on 2014-01-18. The answer was:

    Yes you're right, the User Agent is important for Memotoo

    I think DAVdroid is standard but it is my server not standard so I must
    adjust for some client because they have theirs specification ...

    Tell me what syntax is wrong in Memotoo and the one you want for DAVdroid.

    On my request to turn off User-Agent detection and let it behave "normally" for DAVdroid, the response was:

    Sorry I can not turn off User Agent...

    So plesae contact MemoToo for further discussion about this issue.

    If I can assist you or MemoToo, please let me know.


  • developer

    If you are still interested in using DAVdroid with Memotoo, please contact Memotoo directly because it's an issue on their side.


Log in to reply
 

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