simonbengtsson / eventcal

Filter to only include attending and maybe facebook events in ical and google calendar
http://eventcal.flown.io
MIT License
211 stars 8 forks source link

Chrome strips an & from query string causing errors for some users #9

Closed shamilovtim closed 8 years ago

shamilovtim commented 8 years ago

Initially could not get the calendar to load. Would hit a 'cannot fetch URL' error in G-Cal. I did a bit of troubleshooting and attempted to add it to my subscribed calendars once again.

  1. Events that were Accepted and Tentative were already selected on the site.
  2. Copied my FB webcal URL by clicking on "Upcoming Events" link in FB. This pulled up a chrome popup that had the webcal URL in the field.
  3. Pasted my fb webcal URL into the input: Facebook Calendar input box.
  4. Copied the returned URL of eventcal.flown.io/[...] into my gmail subscribed calendars.

I received an error "cannot fetch URL" from Gmail.

I again attempted this but this time I used "copy link URL" in Chrome on the "Upcoming Events" link. Rest of the steps were the same. This time it synced. I ran a diff on the two urls. First side: clicking the link in chrome, second time: copying the source link from Chrome. Turns out that chrome strips a & from the key parameter on the query string. See the following:

webcal://www.facebook.com/ical/u.php?uid=12345&key=ABCDEFG

webcal://www.facebook.com/ical/u.php?uid=12345key=ABCDEFG

This affected the returned query string by stripping the == operator before &status.

In case this affects users in the future I suggest checking for the stripped & on the query string and correcting it automatically on the return URL.

simonbengtsson commented 8 years ago

What operating system are you running and what is your default calendar application? If I remember correctly the link opens iCalendar on macOS which I think do work. Will try it again later today.

shamilovtim commented 8 years ago

OSX, see screenshot where it trims an & from the query string. I didn't have a default calendar application, I was receiving the URL directly from the popup at first and clicking cancel. That's where the query string turned out to be busted (thanks to OSX Chrome, I would assume. Have not tried in OSX Safari or OSX Firefox). Might be worth a warning in the instructions on the website (or alternatively a check within the app to make sure even if a browser does this, the key param doesn't bust the app).

c31853bc074dc4b5c99d4f8962100387
simonbengtsson commented 8 years ago

Added the ampersand if it is missing now. Let me know if it works for you!