Search code examples
importicalendargcal

Google Calendar not showing events from iCalendar (ics) file hosted on S3


I have generated an ICAL calendar and hosting it on Amazon S3:

When creating a new calendar and selecting import from file and use this ICAL file all events are imported but if I add an internet calendar the calendar gets added but events are never shown and the same for the calendar name.

This is the VCALENDAR data:

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
METHOD:PUBLISH
PRODID:-//github.com/rianjs/ical.net//NONSGML ical.net 4.0//EN
VERSION:2.0
X-ORIGINAL-URL:http://static.exyll.net/exports/chauffeur-ts.ics
X-WR-CALNAME:VG Hoogvliet - chauffeur-ts
X-WR-TIMEZONE:Europe/Amsterdam

I tried different ways of formatting the VEVENT structures:

UTC timestamp

BEGIN:VEVENT
DTEND:20190114T080000Z
DTSTAMP:20190408T165745Z
DTSTART:20190114T060000Z
LOCATION:Rietbroek\, Hoogvliet
SEQUENCE:0
SUMMARY:Onderbezetting - chauffeur-ts (07:00 - 2u)
UID:bed8e415ca443a72a67ea9dc0a6a9bc5
END:VEVENT

Local timestamp + TZID

BEGIN:VEVENT
DTEND;TZID=Europe/Amsterdam:20190114T080000
DTSTAMP:20190408T174500Z
DTSTART;TZID=Europe/Amsterdam:20190114T060000
LOCATION:Rietbroek\, Hoogvliet
SEQUENCE:0
SUMMARY:Onderbezetting - chauffeur-ts (06:00 - 2u)
UID:bed8e415ca443a72a67ea9dc0a6a9bc5
END:VEVENT

No location but with category

BEGIN:VEVENT
CATEGORIES:Onderbezetting
DTEND:20181206T080000Z
DTSTAMP:20190409T081553Z
DTSTART:20181206T050000Z
SEQUENCE:0
SUMMARY:Onderbezetting - bevelvoerder (06:00 - 3u)
UID:638682f0542136a1884d6bdd7136b4c0
END:VEVENT

HTTP headers:

HTTP/1.1 200 OK
x-amz-id-2: VMuHAsEtbQjjqiceomqVth61ycP8uuS7d73G7eI22NEv6EGDt/hAAl4EGA1nHJ4FGNopm+wahyw=
x-amz-request-id: DDD6997ACB409B12
Date: Mon, 08 Apr 2019 17:29:35 GMT
Cache-Control: public
Content-Disposition: attachment; filename="calendar.ics"
Expires: Mon, 01 Apr 2019 00:00:00 GMT
Last-Modified: Mon, 08 Apr 2019 16:57:48 GMT
ETag: "a3e47ff07b8a9b17f91a4a7e4afb5325"
Content-Type: text/calendar
Content-Length: 2883
Server: AmazonS3

I've tried with different http cache headers, not using a content-disposition header, using timestamps without a Z, not specifying CALSCALE, METHOD, X-ORIGINAL-URL, or X-WR-TIMEZONE and I tried not using an UID or a new UID every time the file got generated.

I've reached my limit of finding what could potentially be wrong but still something is.

Who knows why this URL can be added in Google Calendar but never shows its events or its name?


Solution

  • The file contained an UTF8 BOM, this caused the following validator not to load. I'm using c# and had to use new StreamWriter(s, new UTF8Encoding(false)) instead of new StreamWriter(s, Encoding.UTF8)

    The validator states that the ORGANIZER property is needed but that is not correct.