GAS-ICS-Sync icon indicating copy to clipboard operation
GAS-ICS-Sync copied to clipboard

Error sync'ing iCloud Calendar

Open guice opened this issue 1 year ago • 2 comments

The problem

When trying to sync my iCloud calendar, I'm getting the following error:

ParserError: Missing parameter value in 'X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS={addr ln 1}\\n {city} {state} {zipcode}\\nUnited States;X-APPLE-ABUID="{sensored}’s Home"::;X-APPLE-MAPKIT-HANDLE={removed key};X-APPLE-RADIUS={radius};X-APPLE-REFERENCEFRAME=1;X-TITLE={title name addr line 1}'

Screenshot 2023-07-20 at 1 18 34 PM

I looked through my events and I couldn't find one titled with "{title name addr line 1}" (the address). So, I honestly have no idea where it's getting that title. I've attempted to use var onlyFutureEvents = true; with the same error -- and I know I have no future events at my friend's place.

Is there anyway to just log and skip events the code is having trouble sync'ing? This would certainly get it working and allow people to look back to the ones that errored sent, say via the email option?

Version of GAS-ICS-Sync

5.7

Additional information & file uploads

All settings are currently default. I was able to get one calendar sync'd just fine. It's only my Apple iCal calendar that's failing.

I tried creating a sanitized calendar for you, but it appears to be stuck on "waiting" for over 5 minutes. Maybe it errored out on this same issue?

guice avatar Jul 20 '23 21:07 guice

I have discovered the root cause: poor location entries. I commented out the exception line, which then resulted in log warnings of bad lines being parsed. This allowed me to track down the individual events causing these errors -- I had 7 of them. I deleted them from my calendar and now it works!

With that said, is this exception throw really necessary? I commented this out to allow me to finally track down the rouge events: https://github.com/derekantrican/GAS-ICS-Sync/blob/e5cd8e02417ee38a04eadbd795201822dbac2e2d/ical.js.gs#L1894

guice avatar Jul 20 '23 22:07 guice

This fix also worked for me. My iCloud calendar was throwing the same error and I was able to track down the culprits with this Exception commented out.

llllogan avatar Sep 11 '23 04:09 llllogan