Request for Feedback: New CalDAV and CardDAV implementation for Kopano



  • Hello,
    very amazing - the KDav-package is very helpful.

    Unfortunatelly I found an issue, but I am not really sure, whether it is caused by emClient or Kdav or something else:
    My szenario exists of my UCS-Kopano server, two client computers and an Android phone.

    • PC1: Windows 10, Outlook 2007 (IMAP) with CalDAV-Synchronizer as Addin
    • PC2: Windows 10, eClient (IMAP) with builtin CalDAV/CardDAV
    • UCS-Server with Kopmano, Caldav and KDav
    • Huawei P10 with latest Android

    I can create Tasks and Calendar-entries on all devices and they become synchronized without problems.

    I can create contacts on Android and PC1 with Outlook 2007 and they become synchronized to all devices - even to PC2.

    If I create a contact on PC2 it appears for one second and becomes deleted, after synchronizing with KDav-server.
    Strange: Deleting a contact works, so it seems not to be a permission-problem.

    The setting of the contact-access is the same on PC1 and PC2:
    https://dav.meinserver.de:8443/addressbooks/vw/Kontakte

    Enclosure you will find the links to my kdav.log files, because my posting will be too large, if I post the logs.

    PC1 Outlook 2007 with DAV-Synchronizer, where sync works:

    https://www.dropbox.com/s/5ws1sbdjprdulzr/CalDAV-Synchronizer.txt?dl=0

    and now the log of PC2-sync, where the added contact becomes deleted after sync:

    https://www.dropbox.com/s/6fxrf83b478d6vl/CARDDAV-emClient_deletes_Vcards .txt?dl=0

    I found an older thread in emClient-forum, where a similar problem appeared caused by bugs in horde (not on my UCS-server) and sabre:
    https://forum.emclient.com/emclient/topics/carddav_server_contacts_not_showing_in_em_but_when_we_create_contact_on_em_it_is_getting_synced_on_carddav

    I will be very appreciated, if you can help me.





  • Additional Info:
    Contacts with phone numbers only, but without e-mail addresses become synchronized and stored and synchronized with KDav in the contacts folder.
    Just if any email address was typed in, the contact becomes deleted just after sync-attempt.

    If you do any changes in a contact, the changes become rejected (after sync the old state is back again).

    Deleting contacts works.


  • Kopano

    Hi Mornsgrans,

    the emClient uses two different uids when creating a contact:

    11.05.2019 12:47:34 [ 3199] [DEBUG] main PUT /addressbooks/vw/Kontakte/fce26428-fc67-49bf-929b-bc2a4f156af9.vcf
    

    but in the vcard data:

    BEGIN:VCARD
    VERSION:4.0
    PRODID:-//MailClient.VObject/7.2.35128.0
    UID:urn:uuid:e70bbd69-7c81-4be3-8cb8-7bca4a5356fe
    N;SORT-AS="Test, Otto":Test;Otto;;;
    FN:Otto Test
    EMAIL;PREF=1:otto@test.net
    END:VCARD
    

    KDAV uses the one in vcard data (e70bbd69-7c81-4be3-8cb8-7bca4a5356fe) to create a contact, but emClient uses the one from the PUT request (fce26428-fc67-49bf-929b-bc2a4f156af9). I guess that the contact gets deleted because KDAV response is 404 (not found). However the contact should still be in Kopano.

    Manfred



  • Hello Manfred,
    thank you for your reply. Unfortunatelly the contact does not remain in Kopano. But I think, that I now can contact emClient-Support using the hint in your answer.

    Thank you very much.



  • Yesterday in the evening I got answer from emClient-support:


    We have come to the conclusion that the issue is server-side announcing support for vCard 3 and vCard 4 versions (vcardVersion.PNG), but only supporting 3 or not fully supporting v4. We at eM Client try to use the latest possible version the server announced it supports and that seems to be the issue.

    We suggest you either get in touch with Kopano support with this detailed screenshots/information or provide us a direct contact in Kopano to whom we could explain and/or test more. We would also welcome some kind of feedback on the Kopano forum as the analysis done by their team is incorrect, as explained and demonstrated earlier.

    So my question is:
    How can the emClient-support-team contact you?

    P.S.: Changing calendar-entries also sometimes leads to an error.



  • Well, now I have the permission to post the full answer from emClient-support.

    In addition emclient suppert will be very appreciated, if the Kopano team gets in contact with emClient-team to exchange informations to get emClient to sync with Kopano. The Kopano tam can use the case number- but I do not want to publish it in the internet.

    Thank you for the test account. We have tried to simulate the same UID and URL, but as we were afraid of, this did not solve the issue.

    We have come to the conclusion that the issue is server-side announcing support for vCard 3 and vCard 4 versions (vcardVersion.PNG), but only supporting 3 or not fully supporting v4. We at eM Client try to use the latest possible version the server announced it supports and that seems to be the issue.

    Let us explain in more details but please note that if the explanation is too technical, Kopano should be able to fully understand it or if you can provide direct contact at Kopano, we can get in touch with them.

    1, Confirmation that UID and URL can be different:
    We have created very simple basic contact information containing a single word name “TestName” - no space nor any other information. This contact is correctly uploaded to Kopano and stays in server. Please see the screenshot from eM Client,
    raw communication log (TestNameUpload.PNG) and confirmation that the URL is correctly found in SabreDAV/Kopano (SabreDavConfirmation.PNG).

    Creating contact with full name and surname, i.e. “Test Name” will fail here

    2, Creating complex name with same UID and URL
    Like the above case, we have forced eM Client to keep the fields same. This does not help as contact is not created (sameUidURLNotCreated.PNG).

    3, Manually creating a contact in v3 format
    It can be seen from screenshot v3DiffUidURLSaved.PNG that this is correctly processed by Kopano and saved. The URL and UID are different, the version is v3 and name/surname/phone and email are filled in.

    Unfortunately, the vCard version v3 and v4 are not fully backward compatible and there is no configuration option to manually switch the version in eM Client as we fully trust the information server sends us. We try to use the latest supported format to be able to provide our users as much functionality as possible.

    We suggest you either get in touch with Kopano support with this detailed screenshots/information or provide us a direct contact in Kopano to whom we could explain and/or test more. We would also welcome some kind of feedback on the Kopano forum as the analysis done by their team is incorrect, as explained and demonstrated earlier.

    With regards

    Attached I received 5 screenshots:
    vcardVersion.PNG
    vcardVersion.PNG
    v3DiffUidURLSaved.PNG
    v3DiffUidURLSaved.PNG
    TestNameUpload.PNG
    TestNameUpload.PNG
    sameUidURLNotCreated.PNG
    sameUidURLNotCreated.PNG
    SabreDavConfirmation.PNG
    SabreDavConfirmation.PNG


  • Kopano

    Hi Mornsgrans,

    we’ll investigate why it works with vCard version 3., but not with version 4.

    Regarding the vCard 3 and vCard 4 - it’s coming from sabredav which KDAV uses. The current quick workaround this issue would be to edit /usr/share/kdav/vendor/sabre/dav/lib/CardDAV/Xml/Property/SupportedAddressData.php around line 39, so that it looks like this:

            if (is_null($supportedData)) {
                $supportedData = [
                    ['contentType' => 'text/vcard', 'version' => '3.0'],
                    //['contentType' => 'text/vcard', 'version' => '4.0'],
                    //['contentType' => 'application/vcard+json', 'version' => '4.0'],
                ];
            }
    

    This will force using vCard version 3.

    Manfred



  • Hello Manfred,
    thank you for your answer. I changed the file as you recommended and now it nearly works properly.
    Of I want to delete a calendar-entry, I get the message, that it could not be deleted (Precondition failed).
    Creating, modifying and deleting Contacts works.

    If you are interested to exchange with emClient, I can give you needed information to contact them.



  • A few more tests:
    Creating a task or calendar-entry leads to a duplication of each entry after sync.
    If I delete one entry, the other remains in Kopano and needs to be removed manually. This leads to an error that it could not be found on server and I get the offer, to delete locally.
    Attached the logfile in my dropbox (115KB) from creation to deletion.
    https://www.dropbox.com/s/jmp3ja5bc5e2ktj/kdav.log.txt?dl=0

    Next issue:
    The German “Umlauts” are transformed into a wrong charset after creating or modifying in emClient or Outlook 2007 with CalDAVSynchronizer.
    “Rüdiger” becomes transformed to “Rüdiger”, if data are manupulated in Windows client (except Kopano Webapp).
    After correcting the Umlauts in Kopano Webapp the become displayed corretly on mobile device, Kopano and emClient/Outlook.
    It seems, that Umlauts become transformed on upload to UCS via Kdav, but they become trasferred in the right way from UCS to clients.


Log in to reply