Note that there are some explanatory texts on larger screens.

plurals
  1. POUnexpected exception upon serializing continuation Google Apps Script
    primarykey
    data
    text
    <p>I recently started getting the error "Unexpected exception upon serializing continuation" on a spreadsheet Google Apps Script when trying to debug. The error seem to start after I created a connection to the Google CloudSQL api. This error still occurs even after commenting out the jdbc object constructor. It appears that others have had this issue and needed a Google Tech to resolve the issue.</p> <p>I have searched all of the discussion boards for a solution to this issue with no luck. Any chance there is a Google tech out there who could take a look under the hood for me? I would post code if I could determine what line was actually triggering the error.</p> <p>EDIT:</p> <p>Ok, I think I have discovered where the error is occuring. Seems to be the</p> <pre><code>var response = UrlFetchApp.fetch(url + nextPage,oauth_options); </code></pre> <p>in the while loop. Here is the entire function code.</p> <pre><code>function retrieveEvents(endTimeMinimum, updatedAfter, orderBy){ //var url = 'https://www.googleapis.com/calendar/v3/calendars/' + source_cal + '/events?key=' + api_key + "&amp;futureevents=true&amp;orderBy=updated&amp;sortOrder=descending&amp;updatedMin=" + last_sync_date_formated; //var url = 'https://www.googleapis.com/calendar/v3/calendars/' + source_cal + '/events?key=' + api_key + "&amp;orderBy=updated&amp;sortOrder=descending&amp;updatedMin=" + last_sync_date_formated; var url = 'https://www.googleapis.com/calendar/v3/calendars/' + source_cal + '/events?key=' + api_key + "&amp;singleEvents=true"; if ((orderBy != null) &amp;&amp; (orderBy != "")){ url += "&amp;orderBy=" + orderBy; } else url += "&amp;orderBy=updated"; if ((updatedAfter != null) &amp;&amp; (updatedAfter != "")){ url += "&amp;updatedMin=" + updatedAfter; } else url += "&amp;updatedMin=" + last_sync_dateTime; //if no endTimeMinimum is specified, the current time will be used. if (endTimeMinimum == null || endTimeMinimum == ""){ endTimeMinimum = date_rfc339("Today"); } url += "&amp;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) &amp;&amp; (largeString != "")) { jsonObj = JSON.parse(largeString); } if ('items' in jsonObj) events = events.concat(jsonObj.items); if ('nextPageToken' in jsonObj){ nextPage = "&amp;pageToken=" + jsonObj.nextPageToken; continue; } break; } if (events.length == 0)return null; return events; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload