Unexpected exception upon serializing continuation Google Apps Script -
i started getting error "unexpected exception upon serializing continuation" on spreadsheet google apps script when trying debug. error seem start after created connection google cloudsql api. error still occurs after commenting out jdbc object constructor. appears others have had issue , needed google tech resolve issue.
i have searched of give-and-take boards solution issue no luck. chance there google tech out there take under hood me? post code if determine line triggering error.
edit:
ok, think have discovered error occuring. seems the
var response = urlfetchapp.fetch(url + nextpage,oauth_options);
in while loop. here entire function code.
function retrieveevents(endtimeminimum, updatedafter, orderby){ //var url = 'https://www.googleapis.com/calendar/v3/calendars/' + source_cal + '/events?key=' + api_key + "&futureevents=true&orderby=updated&sortorder=descending&updatedmin=" + last_sync_date_formated; //var url = 'https://www.googleapis.com/calendar/v3/calendars/' + source_cal + '/events?key=' + api_key + "&orderby=updated&sortorder=descending&updatedmin=" + last_sync_date_formated; var url = 'https://www.googleapis.com/calendar/v3/calendars/' + source_cal + '/events?key=' + api_key + "&singleevents=true"; if ((orderby != null) && (orderby != "")){ url += "&orderby=" + orderby; } else url += "&orderby=updated"; if ((updatedafter != null) && (updatedafter != "")){ url += "&updatedmin=" + updatedafter; } else url += "&updatedmin=" + last_sync_datetime; //if no endtimeminimum specified, current time used. if (endtimeminimum == null || endtimeminimum == ""){ endtimeminimum = date_rfc339("today"); } url += "&timemin=" + endtimeminimum; logger.log("request url:" + url); var largestring = ""; var events = new array(); var nextpage = ""; var jsonobj while(true){ var response = urlfetchapp.fetch(url + nextpage,oauth_options); largestring = response.getcontenttext(); if ((largestring != null) && (largestring != "")) { jsonobj = json.parse(largestring); } if ('items' in jsonobj) events = events.concat(jsonobj.items); if ('nextpagetoken' in jsonobj){ nextpage = "&pagetoken=" + jsonobj.nextpagetoken; continue; } break; } if (events.length == 0)return null; homecoming events; }
ok, able create problem go away removing seek grab block within function called within seek grab block in main function. no longer seeing "unexpected exception upon serializing continuation" when running programme debugger.
i wish had more solid reply on causes error , how right it.
google-apps-script google-calendar google-spreadsheet google-cloud-sql
No comments:
Post a Comment