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

Error, Retrying...Exception: Address unavailable

Open WoutVerschaeren opened this issue 4 years ago • 3 comments

When running the startSync function, I get this error 3 times before everything in the target calendar is deleted.

WoutVerschaeren avatar Oct 01 '20 13:10 WoutVerschaeren

Please recheck the correct format of your sourceCalendars variable, and make sure the url is reachable.

There also seems to be a similar issue on google's issuetracker for triggered runs.

jonas0b1011001 avatar Oct 01 '20 14:10 jonas0b1011001

The url is definitely reachable, if I enter it in my browser, I can download and view it with no problems.

WoutVerschaeren avatar Oct 05 '20 06:10 WoutVerschaeren

I was experiencing this when my ical links were down.. Sometimes the url is unavailable and in those cases, I just wanted to skip the syncing so that not all the entries were deleted.

I changed the section of code to skip if calendars are not available. I realize this doesn't actually correspond to the reason this issue was opened... but perhaps there should be some option to prevent deletion in case the ics url is unavailable for whatever reason. The little snippet of code I added below solves the issue in my case. I was going to open a new issue and submit a feature request but I'm not sure if I should or if others have a better way to handle this..

    //------------------------ Fetch URL items ------------------------
    var responses = fetchSourceCalendars(sourceCalendarURLs);
    //I added the next If block to handle cases when calendars are unavailable
    if (responses.length == 0){
      Logger.log("Skipping " + targetCalendarName);
      continue;
    }
    Logger.log("Syncing " + responses.length + " calendars to " + targetCalendarName);

geogolem avatar Nov 05 '20 04:11 geogolem

Duplicate of #343

Lonestarjeepin avatar Mar 11 '24 20:03 Lonestarjeepin