This shows in 'logging' occasionally - Something to do with address book

Nextcloud version (eg, 20.0.5): 24.0.3
Operating system and version (eg, Ubuntu 20.04): VPS/Linux/cPanel
Apache or nginx version (eg, Apache 2.4.25): 2.4.something
PHP version (eg, 7.4): 7.4.26

The issue you are facing:

From time to time, a few times per day, this error pops up in Logging.
Seems to be related to addressbook, but I’m not sure what causes it.

I sync contacts from my Macbook Pro (Macos monterey), iPad Air (ios 15) and android 12 (davx5).
All seems to work fine. Sync works, I can edit contacts every where and that syncs fine too.

So not sure what this means or why it’s happening.
Need some ideas/thoughts on how to possibly fix it.

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

Steps to replicate it:

  1. Not sure

The output of your Nextcloud log in Admin > Logging:

[webdav] Fatal: Error: Object of class Sabre\DAV\Xml\Property\Href could not be converted to string at <<closure>>

 0. /path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php line 186
    OCA\DAV\DAV\CustomPropertiesBackend->updateProperties("*** sensitive parameters replaced ***")
 1. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php line 288
    OCA\DAV\DAV\CustomPropertiesBackend->OCA\DAV\DAV\{closure}("*** sensitive parameters replaced ***")
 2. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php line 227
    Sabre\DAV\PropPatch->doCallBackMultiProp(["{http://calend ... "], Closure {})
 3. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1264
    Sabre\DAV\PropPatch->commit()
 4. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 373
    Sabre\DAV\Server->updateProperties("*** sensitive parameters replaced ***")
 5. /path/to/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPropPatch(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
 6. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit("method:PROPPATCH", [Sabre\HTTP\Requ ... }])
 7. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
 8. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
 9. /path/to/nextcloud/apps/dav/lib/Server.php line 352
    Sabre\DAV\Server->exec()
10. /path/to/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
11. /path/to/nextcloud/remote.php line 166
    require_once("/home/ajdgso5/d ... p")

PROPPATCH /remote.php/dav/addressbooks/users/arnandegans/

I found out that these errors are related to addressbook sync, specifically if MacOS (default contacts app) syncs things.

Comparing contact cards in NC web en the macOS contacts app shows several discrepencies with item labels.
Not sure which one causes the issue yet though. But it seems NC reads ‘custom’(ish) labels wrong.

Say I enter 3 email addresses and mark one ‘work’ the other ‘home’ and the last ‘other’ in NC those labels will show up wrong. I can edit them in NC to something readable and workable, but then it messes up in MacOS…

Not sure what’s up with that.

Thoughts? Solutions?

I also realized that these are relevant from the nextcloud.log:

{"reqId":"YzSWn7a6wSCMBnJ_4ayMfgAAAEM","level":4,"time":"2022-09-28T18:46:55+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"MY-USERNAME","app":"webdav","method":"PROPPATCH","url":"/remote.php/dav/addressbooks/users/MY-USERNAME/","message":"Object of class Sabre\\DAV\\Xml\\Property\\Href could not be converted to string","userAgent":"macOS/12.6 (21G115) AddressBookCore/2498.5","version":"24.0.3.2","exception":{"Exception":"Error","Message":"Object of class Sabre\\DAV\\Xml\\Property\\Href could not be converted to string","Code":0,"Trace":[{"file":"/path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":186,"function":"updateProperties","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php","line":288,"function":"OCA\\DAV\\DAV\\{closure}","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php","line":227,"function":"doCallBackMultiProp","class":"Sabre\\DAV\\PropPatch","type":"->","args":[["{http://calendarserver.org/ns/}me-card"],{"__class__":"Closure"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1264,"function":"commit","class":"Sabre\\DAV\\PropPatch","type":"->","args":[]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":373,"function":"updateProperties","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropPatch","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPPATCH",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/lib/Server.php","line":352,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/remote.php","line":166,"args":["/path/to/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","Line":331,"CustomMessage":"--"}}
{"reqId":"YzSdwYVo-PMXNUPowts4kgAAANE","level":4,"time":"2022-09-28T19:17:21+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"MY-USERNAME","app":"webdav","method":"PROPPATCH","url":"/remote.php/dav/addressbooks/users/MY-USERNAME/","message":"Object of class Sabre\\DAV\\Xml\\Property\\Href could not be converted to string","userAgent":"macOS/12.6 (21G115) AddressBookCore/2498.5","version":"24.0.3.2","exception":{"Exception":"Error","Message":"Object of class Sabre\\DAV\\Xml\\Property\\Href could not be converted to string","Code":0,"Trace":[{"file":"/path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":186,"function":"updateProperties","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php","line":288,"function":"OCA\\DAV\\DAV\\{closure}","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php","line":227,"function":"doCallBackMultiProp","class":"Sabre\\DAV\\PropPatch","type":"->","args":[["{http://calendarserver.org/ns/}me-card"],{"__class__":"Closure"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1264,"function":"commit","class":"Sabre\\DAV\\PropPatch","type":"->","args":[]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":373,"function":"updateProperties","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropPatch","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPPATCH",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/lib/Server.php","line":352,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/remote.php","line":166,"args":["/path/to/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","Line":331,"CustomMessage":"--"}}
{"reqId":"YzSk8vIenbVlyWdOgCec4gAAAQw","level":4,"time":"2022-09-28T19:48:02+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"MY-USERNAME","app":"webdav","method":"PROPPATCH","url":"/remote.php/dav/addressbooks/users/MY-USERNAME/","message":"Object of class Sabre\\DAV\\Xml\\Property\\Href could not be converted to string","userAgent":"macOS/12.6 (21G115) AddressBookCore/2498.5","version":"24.0.3.2","exception":{"Exception":"Error","Message":"Object of class Sabre\\DAV\\Xml\\Property\\Href could not be converted to string","Code":0,"Trace":[{"file":"/path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","line":186,"function":"updateProperties","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php","line":288,"function":"OCA\\DAV\\DAV\\{closure}","class":"OCA\\DAV\\DAV\\CustomPropertiesBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropPatch.php","line":227,"function":"doCallBackMultiProp","class":"Sabre\\DAV\\PropPatch","type":"->","args":[["{http://calendarserver.org/ns/}me-card"],{"__class__":"Closure"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1264,"function":"commit","class":"Sabre\\DAV\\PropPatch","type":"->","args":[]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":373,"function":"updateProperties","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/path/to/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPropPatch","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PROPPATCH",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/lib/Server.php","line":352,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/path/to/nextcloud/remote.php","line":166,"args":["/path/to/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/path/to/nextcloud/apps/dav/lib/DAV/CustomPropertiesBackend.php","Line":331,"CustomMessage":"--"}}

There are a bunch, these are just the latest 3. All seem identical. Just with different timestamps.

Screenshot of broken labels for websites in NC web ui. Label is set to “Home Page” in Macos Contacts.
If I set the label “Website” in NC webui it changes it in MacOS Contacts to “HOme page” and in the next sync it shows messed up.

A similar thing happens to Phone number labels (home/work/other) and Social Media links other than the defaults either app offers - For example setting the label ‘Telegram’ whcih is not listed in NC, shows up as “OTHER SOCIAL MEDIA” in Macos for some reason.

Seems like there is some miscommunication between the two… I’m inclined to think the Apple side messes things up as it seemingly works fine on my Android phone.

However, with Nextcloud being the “host” or “master copy” of the data I think there should be a compatibility layer of sorts to accommodate these discrepancies and simply do something along the logic of “if-label-is-nonstandard-reset-to-default-and-warn-user”.
I say this because a client app should not dictate what the data looks like.