Tine 2.0 - Shared addressbook not discovered



  • Hi!

    For some weeks DavDroid is unable to detect shared address books in Tine 2.0. If it is already detected/synced (old install with updated DavDroid) it just works.

    Works:

    • personal address books (default and created)
    • personal calendars (default and created)
    • ! shared calendars !

    Does not work:

    • shared address books

    Other sync software such as CardDAV-Sync (Android app) or vdirsyncer (Python script) just detect the shared address books.

    Deleting the account(s) and/or DavDroid app (incl. reboot after deinstall) does NOT solve the problem. Tested on three different devices (Samsung Galaxy A5 2017 with Samsung-Android /Moto G with Lineage OS-Port / Samsung Galaxy Tab 2).

    Debug log does not include a hint to these shared address books.

    "https://TINE20-BASEURL/addressbooks/shared/" shows me the shared address books.

    If some curl output may help to find and fix this issue just give me the command line 😉

    Bye & THX

    Sven


  • developer

    Hello,

    Did you try with DAVdroid 2.0.4? There have been changes in resource detection. Otherwise, it would be nice if you could send a test account to play@bitfire.at, so that I can have a look without preparing a Tine server first.



  • Hi!

    All devices have DAVDroid 2.0.4-ose. At least the Samsung A5 was updated from 2.0.x as one try in my tests.

    I'll send you test account data as soon as possible.

    THX

    Sven


  • developer

    Hello,

    Thanks for the test account! I have found out that Tine produces different responses for different User-Agents.

    Without DAVdroid User-Agent:

    # curl -vu testuser:XXXXX -X PROPFIND -H "Depth: 1" --data @rq.xml -H "Content-Type: application/xml; charset=UTF-8" https://tine.XXXXXX.tld/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/
    
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:owncloud="http://owncloud.org/ns"><d:response><d:href>/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/</d:href><d:propstat><d:prop><d:current-user-privilege-set><d:privilege xmlns:d="DAV:"><d:write/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-properties/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-content/></d:privilege><d:privilege xmlns:d="DAV:"><d:bind/></d:privilege><d:privilege xmlns:d="DAV:"><d:unbind/></d:privilege><d:privilege xmlns:d="DAV:"><d:unlock/></d:privilege><d:privilege xmlns:d="DAV:"><d:read/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><d:displayname>User, Test</d:displayname><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><card:addressbook-description/><card:supported-address-data/><cal:calendar-description/><x6:calendar-color xmlns:x6="http://apple.com/ns/ical/"/><cal:supported-calendar-component-set/><cs:source/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/3a1e3f348ee6698c517161c63e1707856c29a315/</d:href><d:propstat><d:prop><d:current-user-privilege-set><d:privilege xmlns:d="DAV:"><d:unbind/></d:privilege><d:privilege xmlns:d="DAV:"><d:bind/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-content/></d:privilege><d:privilege xmlns:d="DAV:"><d:read/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><d:displayname>Testadressbuch</d:displayname><card:addressbook-description>Addressbook Testadressbuch</card:addressbook-description><d:resourcetype><d:collection/><card:addressbook/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><card:supported-address-data/><cal:calendar-description/><x6:calendar-color xmlns:x6="http://apple.com/ns/ical/"/><cal:supported-calendar-component-set/><cs:source/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/6f7c2c2a0e49f390e3a36ba0ebc3338f4b7721da/</d:href><d:propstat><d:prop><d:current-user-privilege-set><d:privilege xmlns:d="DAV:"><d:write-properties/></d:privilege><d:privilege xmlns:d="DAV:"><d:unbind/></d:privilege><d:privilege xmlns:d="DAV:"><d:bind/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-content/></d:privilege><d:privilege xmlns:d="DAV:"><d:read/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><d:displayname>Test Users persönliches Adressbuch</d:displayname><card:addressbook-description>Addressbook Test Users persönliches Adressbuch</card:addressbook-description><d:resourcetype><d:collection/><card:addressbook/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><card:supported-address-data/><cal:calendar-description/><x6:calendar-color xmlns:x6="http://apple.com/ns/ical/"/><cal:supported-calendar-component-set/><cs:source/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
    

    Note that the response contains /tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/3a1e3f348ee6698c517161c63e1707856c29a315/, which is the shared address book.

    With fake DAVdroid User-Agent:

    # curl -vu testuser:XXXXX -X PROPFIND -H "Depth: 1" --data @rq.xml --user-agent "DAVdroid/0.1" -H "Content-Type: application/xml; charset=UTF-8" https://tine.XXXXXX.tld/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/
    
    <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:owncloud="http://owncloud.org/ns"><d:response><d:href>/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/</d:href><d:propstat><d:prop><d:current-user-privilege-set><d:privilege xmlns:d="DAV:"><d:write/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-properties/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-content/></d:privilege><d:privilege xmlns:d="DAV:"><d:bind/></d:privilege><d:privilege xmlns:d="DAV:"><d:unbind/></d:privilege><d:privilege xmlns:d="DAV:"><d:unlock/></d:privilege><d:privilege xmlns:d="DAV:"><d:read/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><d:displayname>User, Test</d:displayname><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><card:addressbook-description/><card:supported-address-data/><cal:calendar-description/><x6:calendar-color xmlns:x6="http://apple.com/ns/ical/"/><cal:supported-calendar-component-set/><cs:source/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/tine20/addressbooks/5403d1e2bd563a912415c7ec5adb9a7c2b66a1d5/6f7c2c2a0e49f390e3a36ba0ebc3338f4b7721da/</d:href><d:propstat><d:prop><d:current-user-privilege-set><d:privilege xmlns:d="DAV:"><d:write-properties/></d:privilege><d:privilege xmlns:d="DAV:"><d:unbind/></d:privilege><d:privilege xmlns:d="DAV:"><d:bind/></d:privilege><d:privilege xmlns:d="DAV:"><d:write-content/></d:privilege><d:privilege xmlns:d="DAV:"><d:read/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-acl/></d:privilege><d:privilege xmlns:d="DAV:"><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><d:displayname>Test Users persönliches Adressbuch</d:displayname><card:addressbook-description>Addressbook Test Users persönliches Adressbuch</card:addressbook-description><d:resourcetype><d:collection/><card:addressbook/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><card:supported-address-data/><cal:calendar-description/><x6:calendar-color xmlns:x6="http://apple.com/ns/ical/"/><cal:supported-calendar-component-set/><cs:source/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
    

    Note that the shared address book is missing!

    As a test, I have removed the User-Agent from DAVdroid requests and then the address book is detected:

    0_1537872055547_Screenshot_1537872049.png

    which synchronizes as expected (only in one direction, maybe the address book is read-only but not marked as read-only)?

    Can you report this to Tine and then give us feedback here?