415 error when uploading contact: REV MUST NOT appear more than once in a VCARD component



  • Hi,

    I am still a happy user of DAVdroid with Nextcloud on my phone running LineageOS. I have a contact that fails to upload after a change on my phone, here is the DAVdroid log.

    You can see that the server returns 415: Unsupported media type (REV MUST NOT appear more than once in a VCARD component). Indeed, REV field is present two times for whatever reason.

    I do not know the CardDAV specification, but would it be possible for DAVdroid to detect such issue in the VCARD, delete one of the REV field (I suppose the better would be to delete the oldest), and finally upload the well-formed VCARD?

    Regards,
    Yvan


  • developer

    Hello,

    Thanks for your report. Please follow up at https://forums.bitfire.at/topic/1259/rev-must-not-appear-more-than-once-in-a-vcard-component/ where you can also find a solution.

    I do not know the CardDAV specification, but would it be possible for DAVdroid to detect such issue in the VCARD, delete one of the REV field (I suppose the better would be to delete the oldest), and finally upload the well-formed VCARD?

    DAVdroid uses the ez-vcard parser library. Unfortunately, it's not suitable for repairing vCards, but relies on correct syntax, so there's little we can do 😕



  • Thanks for this fast and precise answer!

    Indeed, modifying the contact from the nextcloud side seems to have "fixed" the VCARD, and I can now upload it again from DAVdroid without issue.

    How could I close this thread?

    Best regards,
    Yvan


  • developer

    Good that it now works for you, thanks for the update! 🙂