On May 9, 2017, at 8:31 PM, Andre LaBranche <dre@apple.com> wrote:
On May 9, 2017, at 11:39 AM, Ian Baker <ibaker@eem.ca <mailto:ibaker@eem.ca>> wrote: ... I’ve made the javascript change, identified the problematic event, and dumped the body text. In fact the body text seems to include two different events, one STATUS:CANCELLED, and the other STATUS:CONFIRMED.
I don't think that in itself is sign of a problem, if these statuses apply to different event instances / recurrences. A single iCalendar body might contain multiple instances if it defines a recurring event for which there are one-off exceptions (e.g. extra attendee for one instance).
How can I identify the problem with this object?
One option is to use the pycalendar library, which is the module used by Calendar Server for dealing with icalendar objects. In that module there's a 'validator' script that takes the path to an .ics file as a command line argument.
╭─ andre@zomg ~/work ╰─ $ git clone https://github.com/apple/ccs-pycalendar.git <https://github.com/apple/ccs-pycalendar.git> Cloning into 'ccs-pycalendar'... remote: Counting objects: 2569, done. remote: Total 2569 (delta 0), reused 0 (delta 0), pack-reused 2569 Receiving objects: 100% (2569/2569), 604.22 KiB | 0 bytes/s, done. Resolving deltas: 100% (2027/2027), done.
╭─ andre@zomg ~/work ╰─ $ cd ccs-pycalendar
╭─ andre@zomg ~/work/ccs-pycalendar ╰─ $ python setup.py build running build running build_py ... copying src/zonal/utils.py -> build/lib/zonal copying src/zonal/zone.py -> build/lib/zonal
╭─ andre@zomg ~/work/ccs-pycalendar ╰─ $ cd build/lib
╭─ andre@zomg ~/work/ccs-pycalendar/build/lib ╰─ $ python pycalendar/validator.py /Users/andre/Desktop/Server\ Staff.ics No problems
I tried this, but was getting "ImportError: No module named pycalendar.icalendar.calendar”
Could I perhaps send you the body text under separate cover?
Yeah, email it to me directly (sanitized if needed).
Will do. Thanks for this André, I really appreciate it!
Also, any thoughts on the issue I described below?
Also a related question. Last week I used the Mac Calendar.app to log into the boss’s account to help him configure some delegation permissions in the app’s preferences, and discovered that a number of emails were sent under my personal email declining invitations. Here is an example:
Ian Baker has declined your invitation to the event: Lunch au bureau, scheduled for January 26, 2017 at 12:00 PM (America/Toronto (EDT) offset -14400 (Daylight)).
I personally was not invited to these events, but the boss was, and he already declined the invitation back in January (according to him).
I don’t understand why these emails were sent. Is this expected behaviour? And if so, is there any way to prevent these from going out?
I have some vague memory of this problem of sending notifications about past events, but I couldn't find a bug specifically about late *email* notifications.
It is possible that your boss went through the correct motions to decline the events, but that didn't actually happen server-side (e.g. iOS clients are generally not awesome at allowing you to know if your changes are hitting the server). To possibly corroborate this, you could look for PUTs / DELETEs of items in your boss' CalDAV inbox, in calendar server's access.log. Even if your boss' declines never processed, it's still a bug to send emails about past events. What versions of everything are you and your boss using?
I am using macOS 10.12.5 Boss is using macOS 10.11.6, and iPhone 10.3.1 Server is macOs 10.11.6, and Server.app 5.2 Just a thought, if, the next time I have to do something like this, I use a freshly created user that doesn’t have mail configured - might this avoid the erroneous outbound notifications? TIA Ian