Status Update
Comments
ma...@gmail.com <ma...@gmail.com> #2
Hello,
Thank you for the details. This has been forwarded internally.
Best regards
uc...@google.com <uc...@google.com> #3
Same here. We have a set-up running which is far below the quota, but on certain occasions it fails when accessing a document with the same error message: "service spreadsheets timed out while accessing document with id".
While normally happening only once in a while, for the last weekend it has been happening on every occasion of it running, which is every hour, so for the last 40+ times of it running it has thrown an error.
For me it fails most often on this row:
spreadsheetApp.openById("...").getSheetByName("name").getRange(1,1, sheet.getLastRow().createTextFinder("...").matchCase(false).findNext();
It would be very helpful if this could be investigated!
Thanks.
ma...@gmail.com <ma...@gmail.com> #4
EDIT: The error happened again this morning (May 22nd) and the code ran on the previous runtime enviornment. So this bug is not specific to the V8 runtime enviornment
[Deleted User] <[Deleted User]> #5
[Deleted User] <[Deleted User]> #6
During the different parts of the execution,
- deleting existing data
- creating new data
It is having issue with the Spreadsheet Service, with no helpful information.
uc...@google.com <uc...@google.com>
ca...@google.com <ca...@google.com>
os...@google.com <os...@google.com> #7
My code:
line 1: function Racer(event)
line 2: {
line 3: var sheetName1 = "Applications: Account# Entry"; // labeling sheet names
line 4: var sheetName2 = "Applications: Credit Entry";
line 5: var sheetName3 = "Applications: Sage Entry";
line 6: var sheet = event.source.getActiveSheet()
line 7: console.log(sheet)
line 8:
line 9: //-----------------------------------------------------------------------------------------------------------------------------------
line 10: if (sheet.getName() == sheetName3) //if it is an edit in the correct sheet then
Sometimes my code will function without any problems. Other times without any changes it will get stuck on line 10 and not stop executing until I cancel the execution or my computer time for the day runs out.
The error message I am receiving via email:
Service Spreadsheets timed out while accessing document with id 1QDqGgQtAncVZS0zx2N7P7BA4-zakPB0k15P******. (line 10, file "Code")
A temporary solution that seemed to work for me:
copy and paste your code into a new
sp...@google.com <sp...@google.com> #8
Number of cells, normally no greater than 300k.
function formatTable(range) {
SpreadsheetApp
.getActiveSheet()
.autoResizeColumns(1, SpreadsheetApp.getActiveSheet().getLastColumn() )
.setActiveRange(range)
.setVerticalAlignment("top")
.setWrap(true)
.applyRowBanding(SpreadsheetApp.BandingTheme.CYAN) ;
};
os...@google.com <os...@google.com> #9
Also getting this, but I can narrow it down to one line.
I have tried different workarounds based on other responses.
This is a simplified script, basically, if I comment out setNumberFormat
and setNumberFormats
then it works, but no matter which one I use, the moment I use it I get the error.
Sep 14, 2020, 7:06:14 PM Error Service Spreadsheets failed while accessing document with id 1w-U7-Zh6bcY9_d0EARN8qes6k72zJy5Q2Nw-70tkYOM.
function onEdit_projections_UsageUnit(e) {
// the sheet that we are generating the dropdowns on
const range_check = (row, column) => (column === 2 && 1 <= row && row < 10);
if (!(
e.value != null
// value has changed
&& e.oldValue !== e.value
&& e.source.getSheetName() === SHEET_PROJECTIONS
&& range_check(e.range.getRow(), e.range.getColumn())
)) {
return;
}
Logger.info('onEdit_projections_UsageUnit activate');
// Option i
// const sheet = e.range.getSheet();
// Option ii
const sheet = e.source.getSheetByName(SHEET_PROJECTIONS);
// const sheet = SpreadsheetApp.getActiveSpreadsheet();
Logger.info(`onEdit_projections_UsageUnit sheet ${sheet.getSheetName()}`);
const mapRange = sheet.getRange('D3:9');
const mapColumns = mapRange.getNumColumns();
Logger.info(`onEdit_projections_UsageUnit mapRange ${mapRange.getNumRows()}:${mapColumns}`);
const modelRange = sheet.getRange('C3:C9'); //mapRange.offset(0, -1, mapRange.getNumRows(), 1);
const models = modelRange.getValues();
Logger.info(`onEdit_projections_UsageUnit models (${models.join(', ')})`);
for (const [index, [model, ]] of models.entries()) {
Logger.info(`onEdit_projections_UsageUnit each:${index} model:${model}`);
if (model === '') {
// wipe out formatting.
} else if (true) {
// option A:
//const rowRange = mapRange.offset(index, 0, 1, mapColumns);
// option B:
const rowRange = sheet.getRange(`D${3 + index + 1}:${3 + index + 1}`);
Logger.info(`onEdit_projections_UsageUnit each:${index} range:${rowRange.getA1Notation()}`);
// option 1:
//rowRange.setNumberFormat(`0.## blah`);
// option 2:
const sploosh = [new Array(mapColumns).fill(`0.## blah`)];
rowRange.setNumberFormats(sploosh);
Logger.info(sploosh);
}
}
Logger.info(`onEdit_projections_UsageUnit done done`);
}
sp...@google.com <sp...@google.com> #10
I am trying to use the setValues() method on a range of 1200 rows x 140 columns ( about 170 000 cells). Usually that takes less than 20 seconds according to the executions log. Starting this week we have started getting a lot of time out errors at this line of code. I created the attached spreadsheet to replicate the issue. Our code is deployed in several different domains, as a google apps script running behind a spreadsheet, not as a web app. This problem happens over at least three different domains so far. Very frustrating. Usually it's accompanied by the spreadsheet saying it's trying to connect, but not always. We have tried this at several different sites with no known internet connectivity issues and this keeps happening.
To replicate: open linked spreadsheet, go to tools->script, select myFunction and press run. View execution log from view -> executions. I have recorded the number of rows and columns in the array passed to setValues().
This is my code:
function myFunction() {
var row1 = 5;
var col1 = 5;
var row2 = 1300;
var col2 = 140;
console.log({numrows:row2, numcols:col2} );
var rng = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1").getRange(row1,col1,row2,col2);
var values_to_set = rng.getValues();
var rng2 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet2").getRange(row1,col1,row2,col2);
rng2.setValues(values_to_set);
}
os...@google.com <os...@google.com> #11
sp...@google.com <sp...@google.com> #12
ma...@gmail.com <ma...@gmail.com> #14
Any news on this?
I am experiencing the same issue.
The last notification mentions a timeout in the Drive service (not in Spreadsheet service):
Drive service timed out opening the document with ID ...
(This is my own translation since I receive notifications in Dutch).
11...@gmail.com <11...@gmail.com> #15
sp...@google.com <sp...@google.com> #16
Tried duplicating the document. Problem gone. (So far; knock on wood.)
ma...@gmail.com <ma...@gmail.com> #17
ro...@gmail.com <ro...@gmail.com> #18
function nurseCovidTracker() {
const destinationSheet = SpreadsheetApp.openById("**************").getSheetByName("Auto-updating PowerSchool data");
const sourceSheet = SpreadsheetApp.openById("***************").getSheetByName("InputFromServer-DoNotRename");
Logger.log("sheets declared")
var sourceRange =sourceSheet.getRange(1,1,sourceSheet.getLastRow(), sourceSheet.getLastColumn());
Logger.log("sourceRange declared");
var sourceData = sourceRange.getValues();
Logger.log("sourceData retreived");
var nurseTrackerColumns = sourceData.map(function(r){
return [r[0], r[5], r[4], r[6], r[16], r[8], r[36], r[9]];
})
Logger.log("columns extracted");
var destinationRange = destinationSheet.getRange(1,1,nurseTrackerColumns.length, nurseTrackerColumns[0].length)
Logger.log("destinationRange declared");
destinationRange.setValues(nurseTrackerColumns);
Logger.log("values set");
}
ma...@gmail.com <ma...@gmail.com> #19
I'm having the same issue.
(Every 1 minutes trigger)
function myFunction() {
// create data
let data = [];
for(let i = 0;i < 1000;i++){
data.push([1,2,3,4,5,6,7,8,9,0]);
}
//write spreadsheet
const spreadsheet = SpreadsheetApp.openById("**************");
const sheet = spreadsheet.getSheets()[0];
sheet.clear();
sheet.getRange("A:A").setNumberFormat('@');
sheet.getRange(1, 1, data.length, data[0].length).setValues(data);
console.log("complete");
}
sp...@google.com <sp...@google.com> #20
--> {fileName=Code (Dynamic Fields), name=Exception, stack= at Code (Dynamic Fields):519 (getDataSources)
at Code (Dynamic Fields):262 (updateMapping)
, lineNumber=519.0, message=Service Drive timed out while accessing document with id {id of document}
be...@google.com <be...@google.com> #21
Exception: Service Spreadsheets failed while accessing document with id 1D4TavSjWzlH_4QyP7ueJI4TXIepXQEkM649jQjNvFK4.
My code:
// function to collect all charts into single sheet from other file
function error_collectcharts(){
var ss = SpreadsheetApp.openByUrl('
var sheets = ss.getSheets(); //surinkti visus sheets
var charts = [];
for (var i = 0; i < sheets.length; i++) {charts = charts.concat(sheets[i].getCharts()); }
var dSheet =SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); // destination sheet
for (var i in charts) {
chart = charts[i].modify().build();
dSheet.getRange(1,1).setValue('test'); // sanity check
dSheet.insertChart(chart); //ikelti kiekviena grafika i dSheet
}
}
sp...@google.com <sp...@google.com> #22
The apps script stops executing on the row containing the getAs() function but it ran fine daily until two days ago.
Example:
var charts = sheet.getCharts();
var chartBlobs = new Array(charts.length);
var emailImages = {};
for (var m = 0; m < charts.length; m++) {
var builder = charts[m].modify();
builder.setOption('width', 800).setOption('height', 350);
var newchart = builder.build();
chartBlobs[m] = newchart.getAs('image/png');
}
be...@google.com <be...@google.com> #23
sp...@google.com <sp...@google.com>
sa...@google.com <sa...@google.com> #24
Recently I get this error with charts, similar as reported above
Temporary workaround: change any right vertical axes to left vertical axes (obviously this won't work if you need both axes).
sp...@google.com <sp...@google.com> #25
Instances of sheets that have previously worked, fail 100% of the time for me, but continue to work for other colleagues.
The other minor difference from most of the comments above is that we get this error when running a macro rather than a bit of app code we have written. (though we do plenty of that too).
In our instance, it fails consistently when trying to insert a chart (which is what the marco is doing).
Like I said, the strangest thing, the marco works for some of us, and doesn't work for others - within the same sheet!
an...@google.com <an...@google.com> #26
In our case it appears the fix was to disable the v8 runtime.
The problem remained after removing what appeared to be the very likely source of this bug: getValues and setValues, though was fixed after removing those, along with also disabling the v8 runtime.
We had also added several SpreadsheetApp.flush(); statements, which have fixed several other GAS bugs we have uncovered. So while it's hard to say which of the above is the exact fix, we are grateful for all your help and that it is now fixed. (Until it happens again. Our next step would be to copy the spreadsheet as others have suggested).
ro...@gmail.com <ro...@gmail.com> #27
sp...@google.com <sp...@google.com> #28
ma...@gmail.com <ma...@gmail.com> #29
11...@gmail.com <11...@gmail.com> #30
I am receiving the same error in multiple script implementations anytime I call sheet.insertChart().
Here is the
To reproduce the error, from the custom menu item select LAD Options/Build Dashboards/Build Simple Dashboard
The error is thrown on line 797 of the Dashboards/DashboardBuilder.gs file
What should happen is that 4 charts should be created on the Simple Dashboard Sheet, but instead it is throwing the exception described above
This script has been working for years, but has suddenly started producing this error within the last month
Description
AI-191.7479.19.36.5721125, JRE 1.8.0_202-release-1483-b03x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080
AS: 3.6 Canary 5; Kotlin plugin: 1.3.41-release-Studio3.5-1; Android Gradle Plugin: 3.6.0-alpha05; Gradle: 5.5; NDK: from local.properties: (not specified), latest from SDK: 20.0.5594570; LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: 3.10.2, from PATH: (not found)
IMPORTANT: Please read
Hi.
Since the last update, i can no longer autocomplete drawables and the resource manager doesn't show anything. I even tried lowering the gradle plugin but still nothing.
Even if i do import from Resource Manager, nothing happens.