Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google calendar add by URL requirements

I am trying to add a Google calendar through the add by URL method. I receive a generic error of "Failed to add imported calendar at 'my URL' for 'my username' " from Google calendar. The URL I'm adding to Google calls a Restful service that sends back a .ics file. I am able to validate my URL here: http://severinghaus.org/projects/icv/ and here: http://icalvalid.cloudapp.net/ What is it that Google calendar is expecting to receive that I am missing?

These are the contents of the .ics file I am returning:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Bryan G LLC//Bryan G Calendar 2014.4.30//EN
X-WR-CALNAME:Bryang Calendar
X-WR-TIMEZONE:America/New_York
BEGIN:VTIMEZONE
TZID:America/New_York
X-LIC-LOCATION:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20140505T131700Z
DTSTART;TZID=America/New_York:20140725T084500
DURATION:PT2H
UID:[email protected]
SUMMARY:Burns JRSR High School FH C V Home Rocky Mountain High School 
LOCATION:Home
DESCRIPTION:
END:VEVENT
END:VCALENDAR
like image 898
user3338432 Avatar asked May 05 '14 13:05

user3338432


1 Answers

Same issue here. I had a very long URL with lots of encoded data, but I'm certain the URL was 100% following the spec. In the server logs I could see that Google wasn't even trying to load the feed, it just rejected it with a generic error. Unfortunately, like MSIE6 was a while ago, google is too big to ignore and they can get away with anything, so now it's my issue to solve.

I tried the following:

  • adding .ical to the URL;
  • encoding the URL-encoded data as hexadecimals instead;
  • adding a random parameter to avoid caching;
  • using a newly created subdomain instead of subfolder;

and maybe more that I don't remember. All useless.

Finally I used the new subdomain and wrote all the encoded data into a file, like user7subscriptions.txt. Now the URL looks like this: http://ical.example.net/?id=7. This works. For no apparent reason, a very short URL will just work.

It has nothing to do with the ical contents. The data never changed, it can't be that Google got a bad cache (I would have seen the request that they would have cached, there never was one).

like image 76
Luc Avatar answered Sep 28 '22 01:09

Luc