Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contacts backup file(*.vcf) of nextcloud andriod app(3.13.1) can not import in contacts app (3.4.1) #7120

Closed
tgly307 opened this issue Oct 21, 2020 · 6 comments · Fixed by #7140

Comments

@tgly307
Copy link

tgly307 commented Oct 21, 2020

the contacts backup file of nextcloud andriod app can not import in contacts app, show Validation error in vCard: ENCODING=QUOTED-PRINTABLE is not valid for this document type.

Steps to reproduce

  1. install nextcloud app on phone and backup contacts in app, ensure backup file uploaded to server
  2. install contacts app on nextcloud server, import from file, choose *.vcf file in .Contacts-Backup folder

Expected behaviour

  • contacts import successfully

Actual behaviour

  • contacts load error, no one can import correctly.

Can you reproduce this problem on https://try.nextcloud.com?

  • yes, I tried upload my backup file to test server and import contacts app, all failed.

Environment data

Android version:
10
Device model:
Huawei Mate30pro
Stock or customized system:
EMUI 10.1.0
Nextcloud app version:
3.13.1
Nextcloud server version:
20.0.0
Reverse proxy:
nginx+docker

Web server error log

Sabre\DAV\Exception\UnsupportedMediaType: Validation error in vCard: ENCODING=QUOTED-PRINTABLE is not valid for this document type.
/var/www/html/3rdparty/sabre/dav/lib/CardDAV/Plugin.php - line 303:

Sabre\CardDAV\Plugin->validateVCard("BEGIN:VCARD ... D", false)

/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\CardDAV\Plugin->beforeCreateFile("addressbook ... f", "BEGIN:VCARD ... D", OCA\DAV\CardDAV\AddressBook {}, false)

/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 1100:

Sabre\DAV\Server->emit("beforeCreateFile", [ "addressbo ... e])

/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 527:

Sabre\DAV\Server->createFile("addressbook ... f", "BEGIN:VCARD ... D", null)

/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:

Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})

/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 474:

Sabre\DAV\Server->emit("method:PUT", [ Sabre\HTTP ... }])

/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:

Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})

/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:

Sabre\DAV\Server->start()

/var/www/html/apps/dav/lib/Server.php - line 325:

Sabre\DAV\Server->exec()

/var/www/html/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/html/remote.php - line 167:

require_once("/var/www/ht ... p")

Nextcloud log (data/nextcloud.log)

{"reqId":"CE4ZRHx7j5JSpcdDGATB","level":4,"time":"2020-10-21T03:09:40+00:00","remoteAddr":"x.x.x.x","user":"test","app":"webdav","method":"PUT","url":"/remote.php/dav/addressbooks/users/test/contacts/A2933D34-8D1B-4B0D-9B97-58EEB3F06F97.vcf","message":{"Exception":"Sabre\\DAV\\Exception\\UnsupportedMediaType","Message":"Validation error in vCard: ENCODING=QUOTED-PRINTABLE is not valid for this document type.","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","line":303,"function":"validateVCard","class":"Sabre\\CardDAV\\Plugin","type":"->","args":["BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID;VALUE=TEXT:ez-vcard 0.10.6\r\nN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nFN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nUID:7e16c4cc-2b0c-455c-aac8-40507981d4f5\r\nREV;VALUE=DATE-TIME:20201021T030932Z\r\nEND:VCARD",false]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeCreateFile","class":"Sabre\\CardDAV\\Plugin","type":"->","args":["addressbooks/users/test/contacts/A2933D34-8D1B-4B0D-9B97-58EEB3F06F97.vcf","BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID;VALUE=TEXT:ez-vcard 0.10.6\r\nN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nFN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nUID:7e16c4cc-2b0c-455c-aac8-40507981d4f5\r\nREV;VALUE=DATE-TIME:20201021T030932Z\r\nEND:VCARD",{"__class__":"OCA\\DAV\\CardDAV\\AddressBook"},false]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1100,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeCreateFile",["addressbooks/users/test/contacts/A2933D34-8D1B-4B0D-9B97-58EEB3F06F97.vcf","BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID;VALUE=TEXT:ez-vcard 0.10.6\r\nN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nFN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nUID:7e16c4cc-2b0c-455c-aac8-40507981d4f5\r\nREV;VALUE=DATE-TIME:20201021T030932Z\r\nEND:VCARD",{"__class__":"OCA\\DAV\\CardDAV\\AddressBook"},false]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":527,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["addressbooks/users/test/contacts/A2933D34-8D1B-4B0D-9B97-58EEB3F06F97.vcf","BEGIN:VCARD\r\nVERSION:3.0\r\nPRODID;VALUE=TEXT:ez-vcard 0.10.6\r\nN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nFN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=E7=8E=8B=E9=97=A8=E7=AA=97\r\nUID:7e16c4cc-2b0c-455c-aac8-40507981d4f5\r\nREV;VALUE=DATE-TIME:20201021T030932Z\r\nEND:VCARD",null]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":325,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":167,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/3rdparty/sabre/dav/lib/CardDAV/Plugin.php","Line":376,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36","version":"20.0.0.9"}
@tgly307 tgly307 added the bug label Oct 21, 2020
@tgly307
Copy link
Author

tgly307 commented Oct 21, 2020

It may be caused by the incompatibility of Chinese. I tried to add an English name contact and it was successful after importing

@AndyScherzinger
Copy link
Member

Duplicate of #7026

@AndyScherzinger AndyScherzinger marked this as a duplicate of #7026 Oct 21, 2020
@AndyScherzinger
Copy link
Member

@tobiasKaminsky see comment above. Unfortunately I haven't found the time yet to report this to the lib project at https://github.com/mangstadt/ez-vcard/issues

@AndyScherzinger
Copy link
Member

Issue raised for the library project at mangstadt/ez-vcard#112
Thanks @j-ed ❤️

@j-ed
Copy link

j-ed commented Oct 21, 2020

@AndyScherzinger The problem has been fixed by the lib maintainer and should be available with the next lib release 🚀

@AndyScherzinger
Copy link
Member

Patch for library has been released and is included in tonight's dev build and thus will also ship with 3.14.0 RC1+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants