sync-engine icon indicating copy to clipboard operation
sync-engine copied to clipboard

Calendar events are sometimes missing from incoming messages

Open raindrift opened this issue 9 years ago • 2 comments

Incoming messages have the events array, containing attached calendar events. Sometimes, when an iCalendar file is attached to a message, the events are set properly. Other times, events is blank. This is true in the delta stream, or if the message is re-fetched from the API later.

We can reproduce by sending the same .ics file as an attachment many times. It works sometimes and not others. There doesn't seem to be anything that can predict it.

Here is a sample .ics that we've been using to test:

BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Pacific Standard Time
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=11
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN=Marc Blinder:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Ashlee Cha
 rette:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Colin McCl
 oskey:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Mark Lanet
 t:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Jeff Feldm
 an:MAILTO:[email protected]
UID:FD2AA5B4-2AB6-4C07-82DE-6158BBABB70C
SUMMARY;LANGUAGE=en-US:Super secret team feature design session
DTSTART;TZID=Pacific Standard Time:20160106T150000
DTEND;TZID=Pacific Standard Time:20160106T170000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20160106T013606Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:3
X-MICROSOFT-CDO-APPT-SEQUENCE:3
X-MICROSOFT-CDO-OWNERAPPTID:2113725996
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DISALLOW-COUNTER:FALSE
END:VEVENT
END:VCALENDAR

We have verified that this sample data parses correctly with the icalendar python module, and that the relevant sync engine code (inbox/events/ical.py) can extract valid data from the parsed result.

raindrift avatar Jan 07 '16 00:01 raindrift

We have been able to attach and send invites that fail on a first import in subsequent emails and see them successfully import, proving the success/failure is not predictable.

mccolin avatar Jan 07 '16 00:01 mccolin

Received a note from the Nylas team that may be related: "We've identified a potential cause for the issue. It appears that if a message has an attached invitation and was sent by the account owner, then we aren't creating an event object for it."

mccolin avatar Jan 11 '16 19:01 mccolin