GNOME Bugzilla – Bug 794924
Reading EWS contact list aborts after error
Last modified: 2018-04-04 14:29:21 UTC
In my work environment I found that in my contact list on the Exchange server my contacts were always empty in Evolution and a message was displayed: The address book backend servicing "Contacts" encountered an error. The reported error was "No results were found." Since the contact list is rather big, I tried to track down the error by creating a custom contact list on the server and copying chunks of the original contact list to it. The problem in my case was caused by some contact groups in that list, so that whenever they were copied to my custom list that error would occur and - even worse - no further contacts would be read. Instead the error should be caught and all remaining contacts that can be read without error imported.
Thanks for a bug report. The Exchange server has an interesting feature which Evolution cannot work with, it's with the distributions lists, they can have set an "alias" address, which works on top of the others. I'm not suggesting you to use it as a workaround (the less as a solution) for this bug report, I'm only mentioning it. Could you try to find out what exact error had been returned by the server, please? You can find it out when you run the addressbook factory from a terminal with EWS debugging on, like this: $ EWS_DEBUG=2 /usr/libexec/evolution-addressbook-factory -w &>log.txt (the actual path can differ on your system) and then you run evolution and reproduce the issue. The log.txt file will contain raw communication between the server and the client. It's not usable for sharing in public, because it contains all the addresses and such, I'd like to see only the error itself, which the server returned when evolution-ews tried to expand the distribution list. It's weird that the (web?) UI let's you add the distribution list which cannot be expanded afterwards, but maybe it's a valid state. I'd like to verify that with this test.
Created attachment 370519 [details] Request and response containing the error after which loading the contacts list stops I've anonymized server name and the address that cannot be resolved. The real address is one of those I had narrowed down as one of the culprits by trial-and-error.
Thanks for the update. It can be that the list is empty or something, I do not know how to make it behave like that, to return ErrorNameResolutionNoResults for an ExpandDL request, but it might be easy to cover and use the distribution list address instead in such cases.
In any case all contacts that can be resolved should be added. As it seems now after the error occurs the process simply aborts.
Yes, I agree with that, it's not a problem. Are you able to give a try to a proposed patch, please? I can test some basic functionality (like whether my changes won't cause any obvious regression), but apart of that I cannot test the behaviour as in your environment, because I do not know how to reproduce it.
Sure. Just send me a patch against 3.28, I'll add this to my spec, build a new RPM and try it out (and enjoy the result if it works) :)
Created attachment 370523 [details] [review] proposed ews patch for evolution-ews; Okay, thanks. Here's the patch. It works the same for me as before, but it might work better for you. To make sure everything works, I'd also remove ~/.cache/evolution/addressbook/<ews-book-uids>/ directories, thus the next start of evolution-addressbook-factory it'll download the whole address book content again. Also, after you install the patched evolution-ews, make sure the addressbook factory is restarted, thus it uses the new evolution-ews.
Tried it. It looks good. I will keep using this version for now, so if I run into problems I can report them.
Thanks for the confirmation. I committed it into the sources as: Created commit d1405d2 in ews master (3.29.1+) Created commit cd71b54 in ews gnome-3-28 (3.28.1+)