GNOME Bugzilla – Bug 771370
Exchange 2016 returns broken MIME content for events with detached instances
Last modified: 2016-09-19 15:02:01 UTC
If you modify an instance of recurring events, the recurring events don't show up anymore, only the modified instance. They are still visible in Outlook Online/OWA. This is only happening on MS Exchange 2016. I also tried to reproduce it on Exchange 2010 but there it works fine. Here's how to reproduce it: 1. Create a recurring event with no end date. E.g. every Monday at 10am. Do this on OWA/Outlook Online 2. Check Evolution, everything is fine. Keep evolution open 3. Change a single instance by moving it to Tuesday 10am (in OWA) 4. Now check Evolution: The changed single instance (i.e. the one moved from Monday to Tuesday) is still there, and there is another one on Tuesday. 5. Now close all Evolution instances and clear the cache, then reopen: pkill -f -9 evolution && rm -rf ~/.cache/evolution/calendar && evolution & 6. Oh boy, all the events on Monday 10am are missing, only the one on Tuesday 10am is there. 7. Funny: if you now keep evolution open and delete the modified instance (the one on Tuesday) within OWA, the recurring events immediately show up again in Evolution. The event on Tuesday is still shown in Evolution, after you clear the cache, it's gone. Tested with: Ubuntu Gnome 16.04 evolution-ews 3.20.5-1~ubuntu16.04.1 Maybe Related: https://bugzilla.gnome.org/show_bug.cgi?id=719797 When receiving an update to a single appointment from a recurring appointment, old appointment isn't removed https://bugzilla.gnome.org/show_bug.cgi?id=726078 After change an instance of a recurring event, the rest of the instances cannot be changed
Created attachment 335488 [details] CalendarItem on Ex2010, OK This CalendarItem is from Step 1 created on Exchange 2010. Start on 29th of August every Monday at 10am. It is valid.
Created attachment 335489 [details] CalendarItem on Ex2010, modified Sequence, OK This CalendarItem is from Step 3 created on Exchange 2010. Start on 29th of August every Monday at 10am. One single instance was moved from september 19th to 20st. It is valid.
Created attachment 335490 [details] CalendarItem on Ex2016, OK This CalendarItem is from Step 1 created on Exchange 2016. Start on 29th of August every Monday at 10am. It is valid. More or less the same as the one for 2010.
Created attachment 335492 [details] CalendarItem on Ex2016, modified Sequence, FAIL This CalendarItem is from Step 3 created on Exchange 2016. Start on 29th of August every Monday at 10am. One single instance was moved from september 19th to 20st. Here you can see the Problem: Exchange does not end the iCal element correctly. It has a 'BEGIN:VCALENDAR' but the 'END:VCALENDAR' is missing. Looks like the Microsoft Developers forgot to add this? And this is probably causing libical to fail parsing the the original recurring events.
I added the calendar items from my tests. On Exchange 2016 there's the problem that if you modify an instance, the original sequence has an invalid iCal element for the MimeContent. I.e., the 'END:VCALENDAR' is missing. Is there an easy way to fix that? E.g. add the END:VCALENDAR in Evolution EWS before passing it to libical? I'll also create a bug report for Microsoft, but this may take a while until it is fixed in the release.
Also posted on technet: https://social.technet.microsoft.com/Forums/office/en-US/9952d9ea-6040-46b8-93d7-f163c09acd70/bug-in-ews-invalid-ical-format-if-recurrent-event-modified?forum=exchangesvrdevelopment
It seems that it is a known problem that on some servers the 'END:VCALENDAR' is missing: https://bugs.open-xchange.com/show_bug.cgi?id=2209 https://sourceforge.net/p/davmail/code/2388/
(In reply to bugzilla-gnome from comment #5) > On Exchange 2016 there's the problem that if you modify an instance, the > original sequence has an invalid iCal element for the MimeContent. I.e., the > 'END:VCALENDAR' is missing. Thanks for a bug report and all the investigation. > Is there an easy way to fix that? > E.g. add the END:VCALENDAR in Evolution EWS before passing it to libical? That would not be a fix, but a workaround for broken Exchange server. The evolution-ews relies on the MIME content. Other software, which ignores it and de-mangles items from object properties, will not be affected, though you found some other which are "broken" too. > I'll also create a bug report for Microsoft, but this may take a while until > it is fixed in the release. Right, I understand it's a pita. I would hope that they'll provide some hotfix at least. It's still the correct thing to do, to fix the Exchange 2016 server, not to add workarounds into each and every software which accesses their data by the public EWS API and relying on correctness of the MIME content generated by them. I'll see what I can do, I may add the workaround for the time being.
Created attachment 335512 [details] [review] ews patch for evolution-ews; The workaround, to be able to read broken mime content returned by an Exchange 2016 server for events with detached instances.
Nice! Just recompiled and it works! Thank you veeery much!!!
Thanks for the confirmation. The code is under hard code freeze, which means no changes are allowed, this week. I'll commit the fix into the sources for 3.22.1 some time next week.
Created commit 4940e4c in ews master (3.23.1+) Created commit cd91f0e in ews gnome-3-22 (3.22.1+)