Page MenuHomePhabricator

Old Calendar events didn't get a utcInstanceEpoch populated, causing fatals on export
Closed, ResolvedPublic


I know Calendar is still in prototype, but @chad asked me to go ahead and file this. (Sorry I forgot about it for so long!) I've confirmed the bug on THIS install, as well as on my own. As of this posting, it's still an issue.

Steps To Reproduce

  1. Go to ANY query on Calendar. For this example, we'll use Month View.
  1. Click Use Results and Export Query as .ics. Name the Export whatever you like. It doesn't matter whether you set it to Public or Privileged mode. Click Create New Export.
  1. On the Export's information page, click the ICS URL.

Expected Behavior

The browser should open the .ics in whatever way it is configured to. Usually this means opening the file in plain text.

Actual Behavior

Phabricator displays the following error.

Unhandled Exception ("Exception")
DateTime::__construct(): Failed to parse time string (@) at position 0 (@): Unexpected character

Version Information

NOTE: This bug is confirmed on THIS installation ( as well, as of 31 Mar 2017 18:36 UTC.

My server's info is...

phabricator 8f7983a5be3a56db5b79dc7c3a0eb470f1d7ca02 (Sat, Mar 25) (branched from b4effdf26c3e7d5de0d010cf14626c5d8d404e04 on origin) arcanist 60aaee0ed3f5a1e4384ac7d7f2efd2c64cecbe44 (Fri, Mar 24) (branched from d1db9a72b552151613a918e3d49fa72433387a68 on origin) phutil b133c277014868d476f08b4ebecde2ea795509e4 (Sat, Mar 25) (branched from c0bc116bedc895fd617799a13549f8707edfd3fb on origin)

Event Timeline

I believe this occurs only if an install has improperly migrated legacy data. This install does; presumably yours does as well.

It looks like some events survived without being assigned utcInstanceEpoch values. We had about 22 such events on this install. None were created later than July 29, 2016 so I believe that this is just an issue with legacy data.

After running a migration to repair this data, I'm able to export from this install. My guess is that bugs which affected the original migration were later fixed.

I'll upstream such a repair migration, which I expect to resolve this for other installs.

epriestley renamed this task from Export ICS Exception to Old Calendar events didn't get a utcInstanceEpoch populated, causing fatals on export.Apr 10 2017, 1:35 PM
epriestley triaged this task as Normal priority.
epriestley moved this task from Backlog to Unprototype (v1) on the Calendar board.

@epriestley, what's weird is, I still have this on my bug install, despite having the latest stable updates. I checked, and the migration definitely ran. Thoughts on how to debug this further?

phabricator c65ef0401e20502eae73b2dbcd1b6c3a5bbc3a21 (Sat, Apr 22) (branched from 03d0e3fdbc890ca9670e8caaf20aa39ebd61d04b on origin) arcanist 40f7d68f75ea9e062f4018b00e1e012cdfb13c9d (Fri, Apr 21) (branched from 146693307f607ffa93dfb99599f1989d5b27e03d on origin) phutil 7c7b02216f335adfdf48cf7ec28e21776af8a3c2 (Fri, Apr 14) (branched from 6fe33623cda69b7814a0767866400e09f4eadf3a on origin)