ksainc / integration_ews

Nextcloud EWS Connector (Exchange Web Services)
GNU Affero General Public License v3.0
26 stars 2 forks source link

Can't sync contacts #37

Closed vcdx71 closed 8 months ago

vcdx71 commented 8 months ago

Using O365 and NextCloud 28.0.3.

I have successfully connected the plugin to O365, and it sees my contact lists in 0365. However, nothing is syncing in either direction. I have selected the main Personal - Contacts list to sync with.

here's my transport log. mike_2024-03-12_17-52-47_EWS.log

vcdx71 commented 8 months ago

I was trying to just sync contacts, didn't configure calendars. I did that as a test and that is working fine, but still no syncing of contacts.

vcdx71 commented 8 months ago

Just saw this in the nextcloud log if it helps..

{"reqId":"ZyU4KZI0WgBVkMzeHjsS","level":3,"time":"2024-03-13T14:50:05+00:00","remoteAddr":"","user":"--","app":"integration_ews","method":"","url":"--","message":"Harmonization launcher encountered an error while harmonizing for mike","userAgent":"--","version":"28.0.3.2","exception":{"Exception":"Error","Message":"Call to a member function getValue() on null","Code":0,"Trace":[{"file":"/var/www/html/apps/integration_ews/lib/Service/Local/LocalContactsService.php","line":242,"function":"toContactObject","class":"OCA\EWS\Service\Local\LocalContactsService","type":"->","args":[["Sabre\VObject\Component\VCard",null,"VCARD"]]},{"file":"/var/www/html/apps/integration_ews/lib/Service/ContactsService.php","line":330,"function":"fetchCollectionItem","class":"OCA\EWS\Service\Local\LocalContactsService","type":"->","args":["7","04B759F0-960E-470E-A5CC-5DA4191C50A5.vcf"]},{"file":"/var/www/html/apps/integration_ews/lib/Service/ContactsService.php","line":164,"function":"harmonizeLocalAltered","class":"OCA\EWS\Service\ContactsService","type":"->","args":["mike","7","04B759F0-960E-470E-A5CC-5DA4191C50A5.vcf","AQMkADE5NTA0ZTZiLTUyMDItNDI3OS04NTZjLTlmOGM0N2MzYjQwZAAuAAADd1CqRY+7P0Oaly6F7Zgm1wEAMUMOlyvPCkaPepNWBY4wMAAAAAIBDgAAAA==","208"]},{"file":"/var/www/html/apps/integration_ews/lib/Service/HarmonizationService.php","line":161,"function":"performHarmonization","class":"OCA\EWS\Service\ContactsService","type":"->","args":[["OCA\EWS\Db\Correlation",208],["OCA\EWS\Objects\ConfigurationObject",["DateTimeZone"],"mike",["DateTimeZone"],5,"L","",5,"R","/Calendar",5,"R","/Tasks",null,"MS365","mike@xxxxx.com","outlook.office365.com","Exchange2016","1"]]},{"file":"/var/www/html/apps/integration_ews/lib/Tasks/HarmonizationLauncher.php","line":102,"function":"performHarmonization","class":"OCA\EWS\Service\HarmonizationService","type":"->","args":["mike"]},{"file":"/var/www/html/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\EWS\Tasks\HarmonizationLauncher","type":"->","args":[["mike"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\BackgroundJob\Job","type":"->","args":[["OC\BackgroundJob\JobList"]]},{"file":"/var/www/html/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\BackgroundJob\TimedJob","type":"->","args":[["OC\BackgroundJob\JobList"]]},{"file":"/var/www/html/cron.php","line":152,"function":"execute","class":"OCP\BackgroundJob\TimedJob","type":"->","args":[["OC\BackgroundJob\JobList"],["OC\Log"]]}],"File":"/var/www/html/apps/integration_ews/lib/Service/Local/LocalContactsService.php","Line":431,"message":"Harmonization launcher encountered an error while harmonizing for mike","exception":[],"CustomMessage":"Harmonization launcher encountered an error while harmonizing for mike"},"id":"65f1be28c55d8"}

{"reqId":"ZyU4KZI0WgBVkMzeHjsS","level":3,"time":"2024-03-13T14:50:05+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Undefined array key \"TYPE\" at /var/www/html/apps/integration_ews/lib/Service/Local/LocalContactsService.php#431","userAgent":"--","version":"28.0.3.2","data":{"app":"PHP"},"id":"65f1be28c569f"}

ksainc commented 8 months ago

Hi @vcdx71

It look like your error is being caused by a malformed NC Contact Entry (Vcard) in addressbook, 7 card id 04B759F0-960E-470E-A5CC-5DA4191C50A5.vcf, the entry seems to be blank so when the app tries to convert it it fails.

Sebastian

vcdx71 commented 8 months ago

Thanks! I found it, it wan't blank but.. I used to work for a company that used jabber for IM and quite a few of my contacts had the address in them, the label had a bunch of random characters. After removing them all the sync started and is working as expected.

Thanks for the reply and for this great app.