NC20: Can't synchronize contact "This parser only supports VCARD and VCALENDAR files"

Nextcloud version (eg, 20.0.5): 20.0.7
Operating system and version (eg, Ubuntu 20.04): slackware-current_x86_64
Apache or nginx version (eg, Apache 2.4.25): 1.12.2
PHP version (eg, 7.4): 7.4.13

The issue you are facing:

I can’t synchronize the contacts. I got an HTTP error 500 from nextcloud server. It seems, the issue is related to a the parser for VCARD/VCALENDAR.

Davx application dump the following error:

SYNCHRONIZATION INFO
Account: Account {name=Recently contacted (user@domain.com WQ), type=at.bitfire.davdroid.address_book}
Authority: com.android.contacts

EXCEPTION
at.bitfire.dav4jvm.exception.HttpException: HTTP 500 Internal Server Error
        at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:5)
        at at.bitfire.dav4jvm.DavResource.checkStatus(DavResource.kt:3)
        at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:1)
        at at.bitfire.dav4jvm.DavAddressBook.multiget(DavAddressBook.kt:10)
        at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke(ContactsSyncManager.kt:2)
        at at.bitfire.davdroid.syncadapter.ContactsSyncManager$downloadRemote$1.invoke(ContactsSyncManager.kt:1)
        at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:1)
        at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:8)
        at at.bitfire.davdroid.syncadapter.ContactsSyncManager.downloadRemote(ContactsSyncManager.kt:2)
        at at.bitfire.davdroid.syncadapter.SyncManager$syncRemote$1$1$1.invokeSuspend(SyncManager.kt:2)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:19)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)

HTTP REQUEST
Request{method=REPORT, url=https://domain.com/remote.php/dav/addressbooks/users/foo/z-app-generated--contactsinteraction--recent/, headers=[Depth:0, Accept-Encoding:br,gzip]}
<?xml version='1.0' encoding='UTF-8' ?><CARD:addressbook-multiget xmlns="DAV:" xmlns:CARD="urn:ietf:params:xml:ns:carddav"><prop><getcontenttype /><getetag /><CARD:address-data content-type="text/vcard" version="4.0" /></prop><href>/remote.php/dav/addressbooks/users/foo/z-app-generated--contactsinteraction--recent/1</href></CARD:addressbook-multiget>

HTTP RESPONSE
Response{protocol=http/1.1, code=500, message=Internal Server Error, url=https://domain.com/remote.php/dav/addressbooks/users/foo/z-app-generated--contactsinteraction--recent/}
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\VObject\ParseException</s:exception>
  <s:message>This parser only supports VCARD and VCALENDAR files</s:message>
</d:error>


REMOTE RESOURCE
https://domain.com/remote.php/dav/addressbooks/users/foo/z-app-generated--contactsinteraction--recent/

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Start Davx
  2. Execute the synchronization
  3. HTTP Error 500 on nextcloud server side

The output of your Nextcloud log in Admin > Logging:

 {"reqId":"84anfkYfE5cMNxwR6nog","level":4,"time":"2021-02-09T14:42:02+00:00","remoteAddr":"10.42.42.5","user":"thomas","app":"webdav","method":"REPORT","url":"/remote.php/dav/addressbooks/users/thomas/z-app-generated--contactsinteraction--recent/","message":{"Exception":"Sabre\\VObject\\ParseException","Message":"This parser only supports VCARD and VCALENDAR files","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","line":90,"function":"parseDocument","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Reader.php","line":47,"function":"parse","class":"Sabre\\VObject\\Parser\\MimeDir","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","line":820,"function":"read","class":"Sabre\\VObject\\Reader","type":"::"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","line":249,"function":"convertVCard","class":"Sabre\\CardDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","line":194,"function":"addressbookMultiGetReport","class":"Sabre\\CardDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"report","class":"Sabre\\CardDAV\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":720,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpReport","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":332,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php","Line":163,"CustomMessage":"--"},"userAgent":"Thunderbird CalDAV/CardDAV","version":"20.0.7.1","id":"6022a05b420d4"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '20.0.7.1',
  'overwrite.cli.url' => 'https://xxx',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'xxx',
  'mail_domain' => 'xxx',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'xxx',
  'mail_smtpport' => 'xxx',
  'mail_smtpname' => 'xxx',
  'mail_smtppassword' => 'xxx',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 1.5,
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

The output of your Apache/nginx/system log in /var/log/____:

nothing has been found at the corresponding date.
Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 21.0.0.18
Operating system and version (eg, Ubuntu 20.04): Raspberry Pi Buster
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian)
PHP version (eg, 7.4): 7.4.16

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. sync client android (DAVx5) has errors on “/z-app-generated–contactsinteraction–recent”

The output of your Nextcloud log in Admin > Logging:

Fatal	webdav	Sabre\VObject\ParseException: This parser only supports VCARD and VCALENDAR files

Don’t know if it’s related.
The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'something',
  'passwordsalt' => 'AJZ3Dj/something',
  'secret' => 'something',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'domain',
    2 => 'subdomain',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'pgsql',
  'version' => '21.0.0.18',
  'overwrite.cli.url' => 'https://<domain>',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => 'port',
  'dbtableprefix' => 'oc_',
  'dbuser' => '<user>',
  'dbpassword' => '<pw>',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'mail.gmx.net',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpname' => '<name>',
  'mail_smtppassword' => '<pw>',
  'mail_from_address' => '<recipient>',
  'mail_domain' => '<provider>',
  'default_language' => '<lang>',
  'default_phone_region' => '<code>',
  'knowledgebaseenabled' => true,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:

empty

I have set up an appointement in NC-calendar itself with attendee.
When i try to connect “https.///z-app-generated–contactsinteraction–recent/” i get “This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.”
Don’t know if it’s related.

In the “DAVx5”-log i find “URL: https:///z-app-generated–contactsinteraction–recent/
Read-only: 1”

Something wrong? How to get rid of the error?

I recognized “contact lists” of my android addressbook beeing set to “All” somehow. Switched back to “DAVx5”. Don’t know yet if this solves the problem.

DAVx5-error seemingly disapppeared. But “This parser only supports VCARD and VCALENDAR files” remains". So no relation.

I see same error message in logging of nextcloud.

I did stop all davx5 clients and switch off online account in my gnome linux desktops.

When opening contacts app in webgui in nextcloud error message imediatelly popUP in log.

I find out that its happend only if user has not “recently contacts”.
User who has “recently contacts” can open contacts app without error message in log.

here is my thread about this problem

Same here with NC 21.0.2 under ubuntu 20.04.2 with PHP 7.4

Error messages

Sabre\VObject\ParseException: This parser only supports VCARD and VCALENDAR files

But i can not figure out which client causes the problem. It is definitely no fresh install.
All my users have contacts, so don’t know where to look at …

Thanks for help.

1 Like

Likewise and I would like to know why my log file is flooded with these fatal errors. It bugs me how cryptic Nextcloud error messages can be to honest. You think this message would include information regarding which client caused it and what it was attempting to parse.