I am attempting to generate a link that takes the user directly to the Google Calendar event selected.
The link I generate is identical to the link that you arrive at when going through the Calendar interface, however, when the user selects the link it loads a blank white page with the Google Calendar header and Keep/Tasks sidebar. None of the actual content loads and I'm given the Unchecked runtime.lastError: The message port closed before a response was received.
error in console. Here's the below code, but as I said - the links are identical.
var events = [];
var today = new Date;
var myEvents = CalendarApp.getDefaultCalendar().getEventsForDay(today);
var calendarId = CalendarApp.getDefaultCalendar().getId();
myEvents.forEach(function(event){
var eventIdSplit = event.getId().split('@');
var newRecord = app.models.Calendar.newRecord();
newRecord.Date = event.getStartTime();
newRecord.Title = event.getTitle();
newRecord.Description = event.getDescription();
newRecord.calendarLink = 'https://calendar.google.com/calendar/r/eventedit/' + (Utilities.base64EncodeWebSafe(eventIdSplit[0] + " " + calendarId));
events.push(newRecord);
});
I've searched the error and found that other users suggested to disable all extensions, however, I am not running any.