DAVdroid 0.9.1.3 does not sync emailarray contacts on Moto X Play 6.0 Marshmallow



  • Hello :-)

    New phone, not previously synced. No errors or warnings but no contacts synced from phone to server or server to phone. Calendar sync not investigated. Manufacturer's Contacts app.

    Same emailarray (PolarisMail) server syncs using both Thunderbird 17.0.11esr with sogo-connector-17.0.2 and using Debian 8 Jessie's Icedove with sogo-integrator-31.0.1.

    SOFTWARE INFORMATION
    DAVdroid version: 0.9.1.3 (87) Sun Jan 03 12:34:57 GMT+05:30 2016
    Installed from: org.fdroid.fdroid
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: automatically
    Account: charles@XXXXXX.org
      Address book sync. interval: 5 min
      Calendar     sync. interval: 5 min
      OpenTasks    sync. interval: —
    
    SYSTEM INFORMATION
    Android version: 6.0 (MPD24.65-18)
    Device: Motorola XT1562 (lux_uds) 
    
    [info ] Preparing synchronization
    [info ] Querying capabilities
    [debug] Received <response> for https://al.emailarray.com/dav.php/addressbooks/charles%40XXXXXX.org/AddressBook/, status: null, properties: [supported-address-data(urn:ietf:params:xml:ns:carddav): at.bitfire.dav4android.property.SupportedAddressData@6eb1afb,
    getctag(http://calendarserver.org/ns/): GetCTag(cTag=2)]
    [info ] Server advertises VCard/4 support: false
    [info ] Processing locally deleted entries
    [info ] Locally preparing dirty entries
    [info ] Uploading dirty entries
    [info ] Checking sync state
    [info ] Remote collection didn't change (CTag=2), no need to query children
    [info ] Remote collection didn't change, skipping remote sync
    

    Best

    Charles


  • developer

    Hello,

    The logs you have posted are from the second synchronization, which doesn't detect any changes to the first synchronization, so it doesn't do anything.

    Please provide more information: What exactly happens (including logs; don't forget to disable automatic sync so that you can manually control when synchronization is started) when you add a contact on the phone and then synchronize? What happens if you add a contact on the server and then synchronize?



  • @rfc2822

    Thanks rfc2822 :)

    Sorry for the testing incompetence.

    After creating a new contact on the Phone:

    [info ] Preparing synchronization 
    [info ] Querying capabilities 
    [debug] Received <response> for https://al.emailarray.com/dav.php/addressbooks/charles%40XXXXXXX.org/AddressBook/, status: null, properties: [supported-address-data(urn:ietf:params:xml:ns:carddav): at.bitfire.dav4android.property.SupportedAddressData@c058fea, 
    getctag(http://calendarserver.org/ns/): GetCTag(cTag=3)] 
    [info ] Server advertises VCard/4 support: false 
    [info ] Processing locally deleted entries 
    [info ] Locally preparing dirty entries 
    [info ] Found local record #197 without file name; assigning file name/UID based on 9276db93-c9f7-41b9-bca3-6caa1f6e8608 
    [info ] Uploading dirty entries 
    [info ] Uploading new record 9276db93-c9f7-41b9-bca3-6caa1f6e8608.vcf 
    [debug] Received new ETag=42d17d671a2208b835572e3b8c32aa66 after uploading 
    [info ] Checking sync state 
    [info ] Remote collection didn't change (CTag=3), no need to query children 
    [info ] Remote collection didn't change, skipping remote sync
    

    The new contact created on the phone was not visible in Thunderird's address book.

    After changing the name of a contact in Thunderbird:

    [info ] Preparing synchronization 
    [info ] Querying capabilities 
    [debug] Received <response> for https://al.emailarray.com/dav.php/addressbooks/charles%40XXXXXX.org/AddressBook/, status: null, properties: [getctag(http://calendarserver.org/ns/): GetCTag(cTag=4), 
    supported-address-data(urn:ietf:params:xml:ns:carddav): at.bitfire.dav4android.property.SupportedAddressData@94236aa] 
    [info ] Server advertises VCard/4 support: false 
    [info ] Processing locally deleted entries 
    [info ] Locally preparing dirty entries 
    [info ] Uploading dirty entries 
    [info ] Checking sync state 
    [info ] Listing local entries 
    [debug] Found local resource: 9276db93-c9f7-41b9-bca3-6caa1f6e8608.vcf 
    [info ] Listing remote entries 
    [debug] Received <response> for https://al.emailarray.com/dav.php/addressbooks/charles%40XXXXXX.org/AddressBook/9276db93-c9f7-41b9-bca3-6caa1f6e8608.vcf, status: null, properties: [getetag(DAV:): GetETag(eTag=42d17d671a2208b835572e3b8c32aa66)] 
    [debug] Found remote VCard: 9276db93-c9f7-41b9-bca3-6caa1f6e8608.vcf 
    [info ] Comparing local/remote entries 
    [info ] Downloading remote entries 
    [info ] Downloading 0 contacts (10 at once) 
    [info ] Saving sync state 
    [info ] Saving CTag=4
    

    After creating a contact in Thunderbird:

    [info ] Preparing synchronization
    [info ] Querying capabilities
    [debug] Received <response> for https://al.emailarray.com/dav.php/addressbooks/charles%40charlesmatkinson.org/AddressBook/, status: null, properties: [supported-address-data(urn:ietf:params:xml:ns:carddav): at.bitfire.dav4android.property.SupportedAddressData@52dbcb8,
    getctag(http://calendarserver.org/ns/): GetCTag(cTag=4)]
    [info ] Server advertises VCard/4 support: false
    [info ] Processing locally deleted entries
    [info ] Locally preparing dirty entries
    [info ] Uploading dirty entries
    [info ] Checking sync state
    [info ] Remote collection didn't change (CTag=4), no need to query children
    [info ] Remote collection didn't change, skipping remote sync
    

    Checked the CardDAV address book in the web interface. The new contact was present.

    One detail that may be relevant. Thunderbird/sogo-connector is configured with a different URL than the one shown in DAVdroid's log: https://charlesXXXXXX--org.emailarray.com/modules/carddav/addressbook.php/addressbooks/charles%40charlesXXXXXX.org/charles-XXXXXX-5/

    Incidentally, I was unable to reply here using Iceweasel; Opera was OK.

    Best

    Charles


  • developer

    One detail that may be relevant. Thunderbird/sogo-connector is configured with a different URL than the one shown in DAVdroid's log: https://charlesXXXXXX--org.emailarray.com/modules/carddav/addressbook.php/addressbooks/charles%40charlesXXXXXX.org/charles-XXXXXX-5/

    This seems to be the cause of your problem. There are two different CardDAV providers: /modules/carddav/addressbook.php and /dav.php/addressbooks. Thunderbird synchronizes with the first one, DAVdroid with the second one.

    There seems to be a problem with your setup. Are the multiple CardDAV services running intentionally? If yes, which one is configured as well-known URL?



  • @rfc2822

    Thanks rfc2822 :)

    I have mailed your question to the service provider, Polaris mail. They are normally very responsive but have not responded about this issue, perhaps because their recommended CardDAV app is Caldav Sync Free Beta (now CalDAV Sync Adapter 1.8.1 but that fails on my phone with "Install error. Failed to install due to an unknown error").

    Best

    Charles



  • PolarisMail replied:

    Hi Charles,

    All URL’s have the same provider as the back-end, it’s just that different applications like to use different URL’s. What happens if you try to configure DAVdroid with the Thunderbid URL ?

    George

    Is it possible to try the configuration George suggested?


  • developer

    @Charles said:

    All URL’s have the same provider as the back-end, it’s just that different applications like to use different URL’s.

    In my opinion, this is a very strange way to configure CalDAV/CardDAV. But why not …

    Is it possible to try the configuration George suggested?

    You can enter the full URL directly and then choose the appropriate address book in the Setup dialog.

    I'd rather suggest to use DAVdroid's URLs in Thunderbird, as those are the ones configured by the provider's well-known URLs (otherwise, DAVdroid wouldn't have found them).



  • https://al.emailarray.com/dav.php/addressbooks/charles%40charlesmatkinson.org/AddressBook/

    Thanks rfc2822 :)

    First, as you suggested, I configured the Thunderbird address book with the URL auto-detected by DAVdroid (https://al.emailarray.com/dav.php/addressbooks/charles%40XXXXXX.org/AddressBook/) and synchronised. The address book entries were replaced by a single test entry, created on the phone. Reverted and got the full address book back.

    Second I configured DAVdroid with the URL used in Thunderbird (https://charlesXXXXXX--org.emailarray.com/modules/carddav/addressbook.php/addressbooks/charles%40XXXXXX.org/charles-m-atkinson-5/) and syncronised.

    That failed:

    [info ] *** STARTING COLLECTION DISCOVERY FOR SERVICE CARDDAV***
    [info ] Check whether user-given URL is a calendar collection and/or contains home-set and/or has current-user-principal
    [trace] --> PROPFIND https://XXXXXX--org.emailarray.com/modules/carddav/addressbook\
    [trace] .php/addressbooks/charles%40XXXXXX.org/charles-m-atkinson-5/ HTTP/1.1
    [trace] Content-Type: application/xml; charset=utf-8
    [trace] Content-Length: 320
    [trace] Depth: 0
    [trace] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:par\
    [trace] ams:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><CARD:addressboo\
    [trace] k-home-set /><resourcetype /><displayname /><CARD:addressbook-description /><current-\
    [trace] user-privilege-set /><current-user-principal /></prop></propfind>
    [trace] --> END PROPFIND (320-byte body)
    [trace] <-- HTTP/1.1 401 Unauthorized (2797ms)
    [trace] Date: Tue, 16 Feb 2016 10:13:37 GMT
    [trace] Server: Apache/2.4.10 (FreeBSD) OpenSSL/1.0.1j-freebsd
    [trace] WWW-Authenticate: Digest realm="Group-Office",qop="auth",nonce="56c2f65129a30",opaque\
    [trace] ="df58bdff8cf60599c939187d0b5c54de"
    [trace] Vary: Accept-Encoding
    [trace] Keep-Alive: timeout=2, max=100
    [trace] Connection: Keep-Alive
    [trace] Content-Type: application/xml; charset=utf-8
    [trace] OkHttp-Sent-Millis: 1455617615685
    [trace] OkHttp-Received-Millis: 1455617616295
    [trace] <?xml version="1.0" encoding="utf-8"?>
    [trace] <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
    [trace]   <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
    [trace]   <s:message>No digest authentication headers were found</s:message>
    [trace]   <s:file>/usr/share/groupoffice/go/vendor/SabreDAV/lib/Sabre/DAV/Auth/Backend/Abstra\
    [trace] ctDigest.php</s:file>
    [trace]   <s:line>66</s:line>
    [trace]   <s:code>0</s:code>
    [trace]   <s:stacktrace>#0 /usr/share/groupoffice/modules/dav/auth/Backend.php(57): Sabre\DAV\
    [trace] \Auth\Backend\AbstractDigest-&gt;authenticate(Object(Sabre\DAV\Server), 'Group-Office\
    [trace] ')
    [trace] #1 /usr/share/groupoffice/go/vendor/SabreDAV/lib/Sabre/DAV/Auth/Plugin.php(108): GO\D\
    [trace] av\Auth\Backend-&gt;authenticate(Object(Sabre\DAV\Server), 'Group-Office')
    [trace] #2 [internal function]: Sabre\DAV\Auth\Plugin-&gt;beforeMethod('PROPFIND', 'addressbo\
    [trace] oks/ch...')
    [trace] #3 /usr/share/groupoffice/go/vendor/SabreDAV/lib/Sabre/DAV/Server.php(433): call_user\
    [trace] _func_array(Array, Array)
    [trace] #4 /usr/share/groupoffice/go/vendor/SabreDAV/lib/Sabre/DAV/Server.php(455): Sabre\DAV\
    [trace] \Server-&gt;broadcastEvent('beforeMethod', Array)
    [trace] #5 /usr/share/groupoffice/go/vendor/SabreDAV/lib/Sabre/DAV/Server.php(214): Sabre\DAV\
    [trace] \Server-&gt;invokeMethod('PROPFIND', 'addressbooks/ch...')
    [trace] #6 /usr/share/groupoffice/modules/carddav/addressbook.php(77): Sabre\DAV\Server-&gt;e\
    [trace] xec()
    [trace] #7 {main}</s:stacktrace>
    [trace]   <s:sabredav-version>1.8.12</s:sabredav-version>
    [trace] </d:error>
    [trace] <-- END HTTP (1379-byte body)
    [debug] PROPFIND on user-given URL failed - EXCEPTION:
    ...
    

    Tentative conclusions:

    • The two URLs do not connect to the same address book
    • Whatever is at the URL used by Thunderbird is not compatible with DAVdroid
    • The defects are in the PolarisMail server configuration rather than DAVdroid

    Reasonable? If so I will take this back to PolarisMail.

    Best

    Charles


  • developer

    @Charles said:

    First, as you suggested, I configured the Thunderbird address book with the URL auto-detected by DAVdroid (https://al.emailarray.com/dav.php/addressbooks/charles%40XXXXXX.org/AddressBook/)

    • There are no SRV/TXt records for _carddavs._tcp.[al.]emailarray.com.
    • There's no well-known URL at https://al.emailarray.com/.well-known/carddav, and it seems that https://al.emailarray.com/` is not a CardDAV service.
    • So how could DAVdroid auto-detect the URL? Did you enter an email address or base URL in DAVdroid?

    and synchronised. The address book entries were replaced by a single test entry, created on the phone. Reverted and got the full address book back.

    Seems OK.

    Second I configured DAVdroid with the URL used in Thunderbird (https://charlesXXXXXX--org.emailarray.com/modules/carddav/addressbook.php/addressbooks/charles%40XXXXXX.org/charles-m-atkinson-5/) and syncronised.

    That failed:

    [info ] *** STARTING COLLECTION DISCOVERY FOR SERVICE CARDDAV***
    [info ] Check whether user-given URL is a calendar collection and/or contains home-set and/or has current-user-principal
    [trace] --> PROPFIND https://XXXXXX--org.emailarray.com/modules/carddav/addressbook\
    [trace] .php/addressbooks/charles%40XXXXXX.org/charles-m-atkinson-5/ HTTP/1.1
    [trace] Content-Type: application/xml; charset=utf-8
    [trace] Content-Length: 320
    [trace] Depth: 0
    [trace] <?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:" xmlns:CAL="urn:ietf:par\
    [trace] ams:xml:ns:caldav" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><CARD:addressboo\
    [trace] k-home-set /><resourcetype /><displayname /><CARD:addressbook-description /><current-\
    [trace] user-privilege-set /><current-user-principal /></prop></propfind>
    [trace] --> END PROPFIND (320-byte body)
    [trace] <-- HTTP/1.1 401 Unauthorized (2797ms)
    

    […]

    [trace] <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
    [trace] <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
    [trace] <s:message>No digest authentication headers were found</s:message>
    [trace] <s:file>/usr/share/groupoffice/go/vendor/SabreDAV/lib/Sabre/DAV/Auth/Backend/Abstra
    [trace] ctDigest.php</s:file>

    […]

    That means that you have to disable pre-emptive authentication (= enable Digest authentication) in DAVdroid (use the checkbox in the Setup activity or in Account Settings).

    Tentative conclusions:

    • The two URLs do not connect to the same address book

    Indeed, at least they behave in a different way.

    • Whatever is at the URL used by Thunderbird is not compatible with DAVdroid

    You have to disable pre-emptivation authentication.

    • The defects are in the PolarisMail server configuration rather than DAVdroid

    Partially. Theoretically, there could be more than one CardDAV service under different paths, but what's the use of this? I guess it's not intended (especially when they say that all use the same backend), but it could be possible.



  • Solved :D

    Disabling pre-emptive authentication resulted in synchronisation.

    Thank you for all your help, rfc2822, especially as the irregularities were at the CardDAV server.

    Best

    Charles



  • Sorry, I did not answer "Did you enter an email address or base URL in DAVdroid?".

    I entered Base URL: https://al.emailarray.com/dav.php

    That URL came from PolarisMail's http://wiki.polarismail.com/display/Support/Sync+contacts+and+events+via+CalDAV+(iOS%2C+Android%2C+Thunderbird%2C+eM+Client)+-+Basic


Log in to reply
 

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