Status Update
Comments
mu...@google.com <mu...@google.com> #2
Hello,
Thank you for the details. This has been forwarded internally.
Best regards
da...@themediacu.be <da...@themediacu.be> #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.
[Deleted User] <[Deleted User]> #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.
wo...@wiem.com <wo...@wiem.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
cr...@qualityclouds.com <cr...@qualityclouds.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) ;
};
ri...@teleforge.co.za <ri...@teleforge.co.za> #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`);
}
an...@demandknown.com <an...@demandknown.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);
}
sy...@y3t.systems <sy...@y3t.systems> #11
[Deleted User] <[Deleted User]> #12
di...@cvogent.be <di...@cvogent.be> #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).
sh...@infuseua.com <sh...@infuseua.com> #15
at...@gmail.com <at...@gmail.com> #16
Tried duplicating the document. Problem gone. (So far; knock on wood.)
sz...@gmail.com <sz...@gmail.com> #17
ab...@waukeeschools.org <ab...@waukeeschools.org> #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");
}
k_...@youknow.jp <k_...@youknow.jp> #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");
}
jo...@copa-webservices.de <jo...@copa-webservices.de> #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}
[Deleted User] <[Deleted User]> #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
}
}
ma...@eset.com <ma...@eset.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');
}
[Deleted User] <[Deleted User]> #23
iv...@olioex.com <iv...@olioex.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).
he...@justeattakeaway.com <he...@justeattakeaway.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...@gmail.com <an...@gmail.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).
ha...@gmail.com <ha...@gmail.com> #27
su...@woodbasket.ag <su...@woodbasket.ag> #28
re...@gmail.com <re...@gmail.com> #29
mi...@agilecreatives.net <mi...@agilecreatives.net> #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
li...@gmail.com <li...@gmail.com> #31
an...@gmail.com <an...@gmail.com> #32
Or it could have been that together with a few SpreadsheetApp.flush()
sm...@gmail.com <sm...@gmail.com> #33
[Deleted User] <[Deleted User]> #34
an...@gmail.com <an...@gmail.com> #35
Utilities.sleep(3000);
or
SpreadsheetApp.flush();
?
Insert a few of those around the lines where the bug occurs.
No guarantees, but my theory is that would fix the problem, or at least help.
These worked for us. So far this has apparently solved two or three cases of this bug we encountered.
It sounds like the command executions get out of order which causes this bug.
So the wait states keep things in the proper order.
r....@gmail.com <r....@gmail.com> #36
yg...@caylym.com <yg...@caylym.com> #37
I used the same code and changed the spreadsheet, and it works fine, perfect in fact.
it was working on the same sheet prior, but now I don't know.
I tried to do an empty chart that didn't work as well .
ro...@watts.me.uk <ro...@watts.me.uk> #38
Workaround used to copy the sheet and run from there and all OK.
Seems like a bug we have to wait to be fixed by Google :(
[Deleted User] <[Deleted User]> #39
ci...@montreal.ca <ci...@montreal.ca> #40
[Deleted User] <[Deleted User]> #41
ek...@kcctech.com <ek...@kcctech.com> #42
da...@vinaudit.com <da...@vinaudit.com> #43
Before: sheet.getRange(1, 1, 1, headerRow.length).setValues(headerRow);
Eliminated this error. Thanks!
an...@gmail.com <an...@gmail.com> #44
Glad to hear the solution fixed your error :^)
Also please let me know if you happen to also encounter this error:
Would be happy to also help you there if needed.
For the other people reading this, as a reminder the method:
Utilities.sleep(3000);
may also work / be needed, in addition to:
SpreadsheetApp.flush();
Please let us know the progress.
The Googlers tell me they are working on this fix.
It sounds like the command executions sometimes get out of order which causes this bug.
So the wait states keep things in the proper order.
Best,
Andy
pa...@gmail.com <pa...@gmail.com> #45
Thanks for all the input. Although the solution for others was adding one or both of these before the timed out line of code:
Utilities.sleep(3000);
SpreadsheetApp.flush();
..that didn't work for me. My solution was to take other advice in this thread and make a copy of my destination file and use that file instead. Yes, my code was also making a values only copy of a file. Maybe google was getting tire of months and months of writing to the same file id. ; >
Good luck.
md...@cesd73.ca <md...@cesd73.ca> #46
I have about 30 spreadsheets all running the exact same function once per day. Execution takes less than a minute on each. The part where it's throwing this error comes right after I delete a sheet. I can make a new sheet, but when I try to name the new sheet with the same name as the old sheet, I get the error some of the time. Some of my sheets seemed to start throwing the error more and more often until I just could not run the function without error.
The sleep alone did not seem to help, but a sleep and then a flush between when the old sheet was deleted and the new sheet being created seems to have fixed things. The sleep/flush had to be before the new sheet was created, though. If I put the sleep/flush directly before the line throwing the error (renaming the sheet) it did not work. The flush had to occur before the new sheet was created.
an...@gmail.com <an...@gmail.com> #47
Much appreciated.
Glad it worked for you, eventually.
Dear Google dev team:
Any updates on a permanent fix?
It seems this workaround has now been proven :^)
Please let me know anything more we can do to help.
Best,
Andy
[Deleted User] <[Deleted User]> #48
The script was working fine until this bug appeared few weeks ago.
I could access to a spreadsheet range only once, then I had the error message "service spreadsheets timed out while accessing document with id".
As workaround, I used the following code between each spreadsheet range access beyond the first :
Utilities.sleep(1000);
SpreadsheetApp.flush();
May the force be with you.
[Deleted User] <[Deleted User]> #49
Hi All, I am also facing the same while pasting data from one sheet to another sheet. at initial stage my script was working fine but now i am facing this issue every time i run the script.
Exception: Service Spreadsheets timed out while accessing document with id 1nSz6FHI0dZg6vilDUWdwCLgLXYat8Y1yM2RXnCAJjs0.
at update_Rm_fms_V4(update RM FMS:10:136)
Code
function update_Rm_fms_V4()
{var e=SpreadsheetApp.openById("1K4c2H18shDU6YM72vw4Msp8AaWQkQaCguDRRvLMCIWQ").getSheetByName("RM FMS"),
//t=e.getLastRow(),
a=e.getRange(2,1,4000,17).getValues();
SpreadsheetApp.openById("1nSz6FHI0dZg6vilDUWdwCLgLXYat8Y1yM2RXnCAJjs0").getSheetByName("Sheetgo_RM Unique Data").getRange(2,1,4000,17).setValues(a),Logger.log(a)
}
an...@gmail.com <an...@gmail.com> #50
Dear @ne...@lyralab.com thank you as well for sharing, and please check @vi...@airbus.com's post just above for the suggested workaround for your case as well. Please let us know the updates. Very likely this fix will also work for you, to bracket around your "getRange(2,1,4000,17).getValues();" and "getRange(2,1,4000,17).setValues(a)" statements which are very likely triggering this bug.
Dear Googlers:
A permanent fix would also be nice yes?
Any updates please?
Thank you,
Andy
br...@sheetgurus.com <br...@sheetgurus.com> #51
su...@perdana.biz <su...@perdana.biz> #52
It happened intermittenly.... It started just last week. It worked smoothly before that...
This is the line that caused the error:
srcHeaderSheet.copyTo(outputNavHeaderSS) --> "copyTo()"
[Deleted User] <[Deleted User]> #53
yu...@gmail.com <yu...@gmail.com> #54
th...@gmail.com <th...@gmail.com> #55
Utilities.sleep(1000);
SpreadsheetApp.flush();
seems to work, however this is adding significant delays to our workflow and is not a long-term solution.
I've also noticed that this seems to be happening more often when formulas on the sheet are still processing even with the workarounds added. Somehow it seems like Apps Script is unable to access the spreadsheet if there are formulas calculating in the sheet while running the script.
Is there any update from the Google dev team on a permanent fix for this issue?
ar...@gmail.com <ar...@gmail.com> #56
This same code has been working for the last two years (daily midnight). But, it is giving the same error "exception: service spreadsheets failed while accessing document with id" for the last month or so.
var backss = SpreadsheetApp.openById("xxx"); //
var gp2 = backss.getSheetByName("GatePass");
//Logger.log(gp2.getSheetName()); - working all right
var gp2lr=gp2.getLastRow();
var today=new Date();
var c=gplr-1;
var m=1;
Utilities.sleep(3000);
SpreadsheetApp.flush();
while ( c > 1 )
{
if (gpvals[c][5] !=="" && gpvals[c][5].getTime() < today.getTime()-(2*24*3600*1000) && gpvals[c][20] == 0 && gpvals[c][23] == 1 )
{
gp2.appendRow([gpvals[c][0],gpvals[c][1],gpvals[c][2],gpvals[c][3],gpvals[c][4],gpvals[c][5],gpvals[c][6],gpvals[c][7],gpvals[c][8],gpvals[c][9],gpvals[c][10],gpvals[c][11],gpvals[c][12],gpvals[c][13],gpvals[c][14],gpvals[c][15],gpvals[c][16],gpvals[c][17],gpvals[c][18],gpvals[c][19],gpvals[c][20],gpvals[c][21],gpvals[c][22],gpvals[c][23],gpvals[c][24],gpvals[c][25],gpvals[c][26],gpvals[c][27],gpvals[c][28] ,gpvals[c][29] ]);
gp.deleteRow(c+1);
m++;
};
c--;
}
an...@gmail.com <an...@gmail.com> #57
Have you tried the workaround? What happened?
Dear ar...@gmail.com
Please add more:
Utilities.sleep(3000);
and
SpreadsheetApp.flush();
inside the while loop.
You can also make the sleep() longer.
The idea is, you need to slow down the script (to prevent this race condition) until it works.
Eventually, when you slow it down enough in the correct places, this workaround is pretty much guaranteed to work.
You have a very complicated while loop. It needs to be slowed down to allow the processing engine to complete before the next commands are issued.
Please share the progress.
Best,
Andy
ar...@gmail.com <ar...@gmail.com> #58
Thanks Andy. Much appreciated.
an...@gmail.com <an...@gmail.com> #59
sa...@gmail.com <sa...@gmail.com> #60
su...@perdana.biz <su...@perdana.biz> #61
Any other input please?
thank you
[Deleted User] <[Deleted User]> #62
an...@gmail.com <an...@gmail.com> #63
Suggest to add more:
Utilities.sleep(3000);
and
SpreadsheetApp.flush();
immediately surrounding the code where the failure is happening.
You can also make the sleep() longer.
The solution algorithm is that you need to slow down the script (to prevent this race condition) until it works.
Eventually, when you slow it down enough in the correct places, this workaround is pretty much guaranteed to work.
I suppose there is a small chance that this workaround fails when using pivot tables, though that would be very surprising.
an...@gmail.com <an...@gmail.com> #64
Suggest to add more:
Utilities.sleep(3000);
and
SpreadsheetApp.flush();
immediately surrounding the code where the failure is happening.
You can also make the sleep() longer.
The solution algorithm is that you need to slow down the script (to prevent this race condition) until it works.
Eventually, when you slow it down enough in the correct places, this workaround is pretty much guaranteed to work.
su...@perdana.biz <su...@perdana.biz> #65
So I used to process 100-200 sheets in 1 run... I think processing more than 70 or 80 sheets will cause the app to generate that error message even with sleep(3000).
So instead of processing more than 70 sheets in 1 shot, I tried 25-30 sheets per batch with sleep(3000), and so far it works fine ... I will try to increase to 35-40 tomorrow see if it still works...
Thanks anyway for your input...
an...@gmail.com <an...@gmail.com> #66
It's possible the new version of the JavaScript execution engine, V8, introduced this problem for you, which as you mentioned is apparently new.
So disabling the new version may help. Otherwise yes please continue adding the workaround commands and surely your runs will get back to 100%, that is nearly certain.
All the best and please let us know the progress.
Andy
an...@gmail.com <an...@gmail.com> #67
confirmed at least one case where upgrading to the v8 Javascript runtime engine caused this timeout bug to begin, whereas the execution worked properly when reverting back to the prior version of the runtime engine.
Also, it seems this bug gets worse the larger the data being processed (which makes sense). My theory is this workaround fails more often as the data size approaches the 50MB file limit set by Google Apps Script (at least this is the limit when importing a CSV file).
Best,
Andy
ad...@gmail.com <ad...@gmail.com> #68
I got the same error while the data size is quite small(less than 1000 rows). I don't think it's related to data size and the sleep() + flush() workaround works for now. My simple function only takes about 3 seconds to run but it needs to wait for 3 seconds to avoid this error. This eat up lots of my app script execution quota. Hope this issue could be solve in near future.
Regards,
Adam
an...@gmail.com <an...@gmail.com> #69
Thank you very much for the update and glad the workaround worked, though it introduced a delay, unfortunately.
Yes, this bug is definitely also related to the types of commands...so far it appears the "getvalues" and "setvalues" commands are more vulnerable to this bug.
The other issue to watch out for is the "exceeds maximum time" error. For some reason, the Google Apps Script runtime has a maximum time limit. So if too many of the pause workarounds are introduced, the entire script will timeout.
I agree, we desperately need a fix.
At the same time, am rearchitecting to process smaller chunks of data.
Thanks again for the update and let's all continue to collaborate so we can better workaround this bug until it is fixed.
Best,
Andy
[Deleted User] <[Deleted User]> #70
Related to this, I've noticed severe recalculations issues with a basic spreadsheet a month ago and today it repeated with another spreadsheet with result not being updated with no acceptable reason and showing nonsense results.
I know it is not related to this bug, but it heavily undermines relying on gsheets as a spreadsheet or automation solution
ad...@gmail.com <ad...@gmail.com> #71
I understand there should be a limit for execution time. I'm grateful Google provides this convenient feature for free to make everyone's life easier. Just hope to provide a reason to maybe raise the priority for this issue. :)
Regards,
Adam
ta...@msh.org <ta...@msh.org> #72
Well done
Kind regards
mu...@google.com <mu...@google.com> #73
Hello everyone,
For the purpose of this investigation, can anyone share an affected spreadsheet? Please make sure you are sharing a sanitized version of it - meaning any confidential information is erased.
ya...@polati.ru <ya...@polati.ru> #74
Has the problem been resolved? I always catch: Exception: Service Spreadsheets failed while accessing document with id *****. In few really heavy tables.
But now all is working.
ad...@gmail.com <ad...@gmail.com> #75
Not sure how to share the spreadsheet better. Sanitized version of my script is pretty simple as below.
function updateConvertHistory()
{
var sheet = SpreadsheetApp.getActive().getSheetByName("Convert History");
var values = [ ["x", "x", "x", "x", "x", "x", "x", "x", "x"] ];
sheet.insertRowAfter(1);
sheet.getRange("A2:I2").setValues(values);
}
Setup an hourly trigger to run updateConvertHistory() would get the error 1-2 times a week.
adam
ni...@imagination.com <ni...@imagination.com> #76
ch...@roche.com <ch...@roche.com> #77
[Deleted User] <[Deleted User]> #78
I don't have any spreadsheets that don't have confidential information for testing. Any time I notice this error, it's usually on an important spreadsheet that has lots of info and real world usage. If I make a copy, it won't get the same volume of usage as the live sheet.
If you're happy to look at a live spreadsheet with confidential data (I think Google already has NDAs in place), please get in touch and let me know who to share it with
vf...@valeo.com <vf...@valeo.com> #79
Can not provide a sheet as it has confidential information. Appears while gathering and setting values from other sheets with 20K+ rows.
Here is a code example I am using:
function onRun(){
var ui = SpreadsheetApp.getUi()
ui.createMenu("Actualize")
.addItem("Actualize imported info", "ImportRangeReq")
.addToUi()
}
function ImportRangeReq() {
var ss_origin = SpreadsheetApp.openByUrl("x").getSheetByName("n")
var ss_target = SpreadsheetApp.openByUrl("y").getSheetByName("n")
var ranges = ["r","r","r","r","r","r","r"]
ranges.forEach(function(name,index){
var data_range = ss_origin.getRange(name)
var source = data_range.getValues()
var last_row = source.length
ss_target.getRange(2,index+19).clear
ss_target.getRange(2,index+19,last_row).setValues(source)
})
}
[Deleted User] <[Deleted User]> #80
One of my sheets scripts suddenly stop working and the issue was caused by a filter being applied to the target range where a delete of rows had to be performed.
So, you may need to unselect a filter or even remove it before handling a range and then reapplying it.
se...@columbus.edu.co <se...@columbus.edu.co> #81
var HSData =SpreadsheetApp.getActive();
Logger.log("Got active spreadsheet");
var HSSupplementalLinkTab = HSData.getSheetByName("HS Sup Link");
Logger.log("Got tab where supplemental link is found");
var HSSupplementalLink = HSSupplementalLinkTab.getRange("C2").getValue();
Logger.log("Got Supplemental link");
Sep 7, 2021, 8:17:13 AM Info Got active spreadsheet
Sep 7, 2021, 8:18:55 AM Info Got tab where supplemental link is found
Sep 7, 2021, 8:23:19 AM Info Got Supplemental link
Sep 7, 2021, 8:29:02 AM Error Service Spreadsheets timed out while accessing document with id 1B6xCMm21uVVU9RUxm-NwznJ76xnG6G5M1dhWjxNYz2E.
sk...@boweryfarming.com <sk...@boweryfarming.com> #82
ka...@hbc.com <ka...@hbc.com> #83
ar...@gmail.com <ar...@gmail.com> #84
It has only 2000 rows and 26 columns.
I set up a trigger for the below function (runs every hour)
//
function lock_row_2(){ //done 7-6-20
//prevent deletion / edit after printing -- speedier - protect continuous rows together
// timer to run every hour
var ss = SpreadsheetApp.getActiveSpreadsheet();
var gpsht = ss.getSheetByName("GatePass");
var gplr=gpsht.getLastRow();
var locks = gpsht.getRange("W:X").getValues();
for (i=1 ; i < gplr ; i++){//
if (locks[i][0]=="") { //not yet locked
break;
}//if
}//for
//
for (j=gplr-1 ; j >= i ;j--){//ignore already locked
if (locks[j][0]=="" && locks[j][1]==1 ) { //not yet locked , printed
for (k=j-1 ; k >= i ; k--){//ignore already locked
if (locks[k][0]=="" && locks[k][1]==1 ) {} else { break }; //already locked
}//for
//to prevent others from editing printed rows
SpreadsheetApp.flush();
Utilities.sleep(1000) ;
var protection = gpsht.getRange('A'+(k+2)+':Q'+(j+1)).protect().setDescription('Locked');
protection.removeEditors(protection.getEditors());
gpsht.getRange("W"+(k+2)+":W"+(j+1) ).setValue(1);
SpreadsheetApp.flush();
Utilities.sleep(1000) ;
j=k;
}//if
}//for
}//function
//
It gives error most of the time . It runs ok some times. It is unpredictable.
Your script, Gate_Pass, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.
Summary:
Error Message Count
Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg9EUzwvTEwN8Uhv-oXtn_aM. 15
Start Function Error Message Trigger End
10/12/21 9:57:17 AM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaE-oXtn_aM. time-based 10/12/21 9:58:50 AM IST
10/12/21 10:57:17 AM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEn_aM. time-based 10/12/21 10:58:51 AM IST
10/12/21 11:57:17 AM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEgUhv-oXtn_aM. time-based 10/12/21 11:58:49 AM IST
10/12/21 12:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg98Uhv-oXtn_aM. time-based 10/12/21 12:58:51 PM IST
10/12/21 1:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEgEwN8Uhv-oXtn_aM. time-based 10/12/21 1:58:52 PM IST
10/12/21 2:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg9EN8Uhv-oXtn_aM. time-based 10/12/21 2:58:50 PM IST
10/12/21 3:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg9EU8Uhv-oXtn_aM. time-based 10/12/21 3:58:51 PM IST
10/12/21 4:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg9EwN8Uhv-oXtn_aM. time-based 10/12/21 4:58:50 PM IST
10/12/21 5:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEgXtn_aM. time-based 10/12/21 5:58:51 PM IST
10/12/21 6:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg9ETEwN8Uhv-oXtn_aM. time-based 10/12/21 6:58:54 PM IST
10/12/21 7:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEgwN8Uhv-oXtn_aM. time-based 10/12/21 7:59:34 PM IST
10/12/21 8:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg9N8Uhv-oXtn_aM. time-based 10/12/21 8:58:53 PM IST
10/12/21 9:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEgN8Uhv-oXtn_aM. time-based 10/12/21 9:58:53 PM IST
10/12/21 10:57:17 PM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEg-oXtn_aM. time-based 10/12/21 10:58:53 PM IST
10/13/21 9:57:17 AM IST lock_row_2 Exception: Service Spreadsheets timed out while accessing document with id 1JdxCnaEn_aM. time-based 10/13/21 9:58:50 AM IST
an...@gmail.com <an...@gmail.com> #85
ab...@flagbearer.net <ab...@flagbearer.net> #86
I have the same issue but happens on one spreadsheet only! I export from and import to this spreadsheet. They fail in both directions. However, they both succeed when I use another spreadsheet. The data is the same on both spreadsheets.
It is the same whether the V8 runtime is enabled or not.
Thanks
tb...@moravia.com <tb...@moravia.com> #87
+1, we're seeing this issue newly since last week on a bunch of spreadsheets that worked without any issues for months and months.
ib...@moravia.com <ib...@moravia.com> #88
ra...@gmail.com <ra...@gmail.com> #89
It works when I run the function from App Script but the "every minute" trigger keep having this issue :
Exception: Service Spreadsheets timed out while accessing document with id 1UhQIHcT9-........
I've tried many tricks i've seen in here but it keeps having errors when it's started from the automated trigger.
an...@gscript.pro <an...@gscript.pro> #90
More than a year has passed since the problem was described.
Question to Google representatives: What have you done during this time to solve this problem?
ar...@gmail.com <ar...@gmail.com> #91
ni...@imagination.com <ni...@imagination.com> #92
ha...@gmail.com <ha...@gmail.com> #93
a....@pa.ag <a....@pa.ag> #94
al...@gadgetrecycling.ltd <al...@gadgetrecycling.ltd> #95
vf...@valeo.com <vf...@valeo.com> #96
Be aware it's not a complete cure.
an...@gscript.pro <an...@gscript.pro> #97
Exception: Service Spreadsheets timed out while accessing document with id ....
at line with "useRange.setValues(dataToInsert);"
ro...@gmail.com <ro...@gmail.com> #98
[Deleted User] <[Deleted User]> #99
ab...@waukeeschools.org <ab...@waukeeschools.org> #100
Original post (with a non-functional workaround):
POTENTIAL WORKAROUND
I'm not sure how many will benefit from this, as it doesn't address all the causes of this, but here's a workaround that seems to be helping me.
I have a large amount of data being transferred from one spreadsheet to another overnight. I've been getting this error at the range.setValues() line of the script about 25% of the time for the last year or so, but recently it's been every time. Today I tried changing up my range.setValues so that, instead of doing it all at once, it sets the values one column at a time. This ran quickly and without errors. Here's the code change I made:
ORIGINAL:
// dataToTransfer is an array that contains the values from the source spreadsheet
destinationSheet.getRange(1,1,dataToTransfer.length,dataToTransfer[0].length).setValues(dataToTransfer);
NEW:
// iterates through the columns for as many columns as the transfer data contains
for (i=0;i<dataToTransfer[0].length;i++){
// map source data to retrieve individual columns
var singleColumn = dataToTransfer.map(function(r){
return [r[i]];
})
//set values for a single column at a time
destinationSheet.getRange(1,i+1,singleColumn.length,1).setValues(singleColumn);
Logger.log("Column "+(i+1)+" set")
}
I don't have a lot of data on this, but so far the script (which had been running for about 2 minutes and then failing) is completing successfully in about 10 seconds, with 8-10 runs to verify it works. I even ran the old code a few times in there to verify it still failed while the new code was working. Still not a fix to whatever is causing this, but maybe a viable workaround, depending on your situation. Good luck!
a....@pa.ag <a....@pa.ag> #101
jp...@hoakeen.com <jp...@hoakeen.com> #102
I did the same thing as the comment above: Moved the script to a new spreadsheet and seems to be working fine.
My previous spreadsheet was heavy... many sheets... thousands of rows on each... many importrange and vlookup formulas, etc.
After running the same script everyday for aprox 2 years, the "service spreadsheets timed out while accessing document with id" error started to appear.
I also noticed that the "Your spreadsheet is to heavy to work offline" message started to appear often as well and I was not having problems with my internet connection.
pa...@holcim.com <pa...@holcim.com> #103
It is clear that Google Appscript is not ready to manage a significant number of rows.. and Im not speaking about millions or even hundred thousand os rows.... In my case Im speaking about 25K rows. Im going to move my data out to a professional tool.
Thanks Google for nothing.
[Deleted User] <[Deleted User]> #104
Hoping to have this fixed soon by the apps script dev team.
pa...@gmail.com <pa...@gmail.com> #105
The script wrote for this 2 sheets to interact, is very simple, and consist on getting the range and values from sheet 1 (about 150000 cells) and setting the values on sheet 2.
Now, if i try to run the script using my personal account, i get the "service spreadsheets timed out while accessing document with id ..." error. The error shows at about 140 seconds.
At work , i have been issued a corporate paid account , that uses my work email,, p.....@c..
When i run this same script, with this work paid account, the error never shows up, and the script finishes successfully after about 50 seconds.
Anyone having the same issue?
sm...@gmail.com <sm...@gmail.com> #106
I wonder if anyone get help me optimize this script, is there a better way to make this work?
The idea is simple to take all the data from one tab in a sourceSpreadsheet and then copy it to one tab on multiple spreadsheet.
This script was the only workaround I could find because IMPORTRANGE is very unstable, but now after a while that this script has been fine, I'm getting "service spreadsheets timed out while accessing document with id"
I just added Utilities.sleep(1000) below after reading comment, but I'm not even sure I did it right.
var sourceSpreadsheetID = "SourceSheetID-xxxxxxx"; //SourceSheet
var sourceWorksheetName = "All";
//TARGET SHEETS
var targetSpreadsheetID = "sheetID01"; //BETA SHEET
var targetWorksheetName = "SOURCE-AppS";
var targetSpreadsheetID02 = "sheetID02-xxxxxxxxx"; // sheet02
var targetSpreadsheetID03 = "sheetID03-xxxxxxxxx"; // sheet03
var targetSpreadsheetID04 = "sheetID04-xxxxxxxxx"; // sheet04
function importData() {
var thisSpreadsheet = SpreadsheetApp.openById(sourceSpreadsheetID);
var thisWorksheet = thisSpreadsheet.getSheetByName(sourceWorksheetName);
var thisData = thisWorksheet.getDataRange();
var toSpreadsheet = SpreadsheetApp.openById(targetSpreadsheetID);
Utilities.sleep(1000)
var toSpreadsheet02 = SpreadsheetApp.openById(targetSpreadsheetID02);
Utilities.sleep(1000)
var toSpreadsheet03 = SpreadsheetApp.openById(targetSpreadsheetID03);
Utilities.sleep(1000)
var toSpreadsheet04 = SpreadsheetApp.openById(targetSpreadsheetID04);
var toWorksheet = toSpreadsheet.getSheetByName(targetWorksheetName);
var toWorksheet02 = toSpreadsheet02.getSheetByName(targetWorksheetName);
var toWorksheet03 = toSpreadsheet03.getSheetByName(targetWorksheetName);
var toWorksheet04 = toSpreadsheet04.getSheetByName(targetWorksheetName);
var toRange = toWorksheet.getRange(1, 1, thisData.getNumRows(), thisData.getNumColumns())
toRange.setValues(thisData.getValues());
SpreadsheetApp.flush();
var toRange02 = toWorksheet02.getRange(1, 1, thisData.getNumRows(), thisData.getNumColumns())
toRange02.setValues(thisData.getValues());
SpreadsheetApp.flush();
var toRange03 = toWorksheet03.getRange(1, 1, thisData.getNumRows(), thisData.getNumColumns())
toRange03.setValues(thisData.getValues());
SpreadsheetApp.flush();
var toRange04 = toWorksheet04.getRange(1, 1, thisData.getNumRows(), thisData.getNumColumns())
toRange04.setValues(thisData.getValues());
SpreadsheetApp.flush();
}
an...@demandknown.com <an...@demandknown.com> #107
br...@sanmina.com <br...@sanmina.com> #108
Im having the same issue in the following script;
function ParseMeswebDefects() {
var validate = GmailApp.getUserLabelByName("AllMachines2021").getThreads(); //Get emails under that label
var qty= validate.length
Logger.log(qty)
if(qty == 0.0){
Logger.log("Nothing To Paste");//If 0 = nothing to paste
}
else {
var threads = GmailApp.getUserLabelByName("AllMachines2021").getThreads(0,1); //If email labeled
var messages = threads[0].getMessages();
var len = messages.length;
var message=messages[len-1]
var attachment = message.getAttachments()[1];
attachment.setContentType('text/csv');
var day=new Date();
if (attachment.getContentType() === "text/csv") {
var sheet = SpreadsheetApp.openById("1BW2dWVVtpqyFc-h6riQBBQuMsBsDOHprzaGdeZ46aZw").getSheetByName("Source"); //tab name (destination file)
var csvData = Utilities.parseCsv(attachment.getDataAsString(), ",");
sheet.clearContents();
sheet.getRange(1, 1, csvData.length, csvData[0].length).setValues(csvData);
Logger.log("Import Complete")
var lastcol=sheet.getLastColumn()+1
sheet.getRange(1,lastcol ).setValue(day);
}
GmailApp.moveThreadsToTrash(threads);
}
}
Any idea how it can be fixed?
di...@cvogent.be <di...@cvogent.be> #109
After not seeing this error for almost a year it has now happened again to one of my spreadsheets. Coincidentally or not, I recently (finally?) switched to the new IDE. When I run the scripts manually, the problem seems to occur less often. I have not applied any workarounds because I don't think this should be necessary. I hope the Google team finally comes up with a solution, if not at least an explanation.
is...@google.com <is...@google.com>
le...@morrisonsplc.co.uk <le...@morrisonsplc.co.uk> #110
I have also noticed that once its has ran ok it is normally fine for several minutes, but then after a few minutes on inactivity it reverts to having problems.
I am also finding that scripts in general are much slower than they used to be, not sure if its related.
di...@cvogent.be <di...@cvogent.be> #111
I found out that for some obscure reason sheet.getLastColumn() was the problem (although it had worked fine before). I hardcoded the last column and since then I haven't seen the problem.
pi...@sadhguru.org <pi...@sadhguru.org> #112
Update:
Using the advanced Sheets API solved it for me, as reported in this ticket:
pi...@sadhguru.org <pi...@sadhguru.org> #113
le...@morrisonsplc.co.uk <le...@morrisonsplc.co.uk> #114
on multiple spreadsheets
using copyTo works perfectly, but is limited to being in the same
spreadsheet so cannot work to replace my setValues, not sure if there is
another function available instead of setValues that allows you to send
data to another spreadsheet, obviously would use importrange however not
stable enough and often fail during reporting.
Thx
Lee Edwards
* Finance Specialist - Store Reporting*
On Fri, 17 Jun 2022 at 12:11, <buganizer-system@google.com> wrote:
--
--
*Please note that Wm Morrison Supermarkets PLC is now Wm Morrison
Supermarkets Limited. Please amend your records accordingly.*
Wm Morrison
Supermarkets Limited is registered in England with number 358949. The
registered office of the company is situated at Gain Lane, Bradford, West
Yorkshire BD3 7DL. This email and any attachments are intended for the
addressee(s) only and may be confidential.
If you are not the intended
recipient, please inform the sender by replying to the email that you have
received in error and then destroy the email. If you are not the intended
recipient, you must not use, disclose, copy or rely on the email or its
attachments in any way.
This email does not constitute a contract in
writing for the purposes of the Law of Property (Miscellaneous Provisions)
Act 1989.
Our Standard Terms and Conditions of Purchase, as may be
amended from time to time, apply to any contract that we enter into. The
current version of our Standard Terms and Conditions of Purchase is
available at:
<
Although we have taken steps to ensure
the email and its attachments are virus-free, we cannot guarantee this or
accept any responsibility, and it is the responsibility of recipients to
carry out their own virus checks.
me...@focusglobalinc.com <me...@focusglobalinc.com> #115
I suspect the getRow() and getColumn() functions caused the error.
var row = 3; //m.getRange(dname).getRow();
var col = 1; //m.getRange(dname).getColumn();
an...@gscript.pro <an...@gscript.pro> #116
More than two years you can NOT SOLVE the "Timeout" problem!
How long can you release software updates without conducting its full and sufficient testing !?
How much can you mock people who pay you MONEY !?
Today I again encountered the problem of "Timeout" when executing the "SpreadsheetApp.openByUrl(value);" function.
## Exception: Service Spreadsheets timed out while accessing document with ID .... ##
If you cannot solve this problem, create a toolkit so that the script can bypass this bug.
For example, give us the ability to programmatically set the timeout from the script (now by default this time set to 10 (!) minutes).
Include in one of the classes a function that will return the document ID by its URL, so that we can open all documents only by their ID, without using the ".openByUrl(value)" function.
Solve URGENT problems somehow, don't do any garbage like "Let's make a NEW editor"...
The first is much more important and more necessary for your clients !
cl...@gmail.com <cl...@gmail.com> #117
Your script users are trying to identify a consistent set of conditions which lead to the error and flailing away, unable to come up with an effective work-around. You are the only ones who can solve this bug.
I’ve also encountered the “Exception: Document xxx” is missing (perhaps it was deleted, or you don't have read access?)” error on an intermittent basis but NEVER on the first access of the document … another clear Google bug.
I guess that I have no basis for complaint, because I am using a free account. I am totally at a loss, however, to understand why ANY company would rely on Google for an essential process.
ni...@7pointllc.com <ni...@7pointllc.com> #118
I've been effectively avoiding this bug for the last few months using the following code. Feel free to modify it for your own purposes. The only caveat to using this function as is, is that it will only copy an entire sheet contents as a matched set( i.e. sheetxx!A:Z to sheetxy!A:Z, not sheetxx!A:Z to sheetxy!A:C) if that makes any sense.
function CopyData(ssurl, dataS, ssTarget, ssRange) {
//Spreadsheet Service MUST be enabled for this function
//ssurl = the URL of the workbook you are trying to get data from
//dataS = the name of the sheet inside the above workbook
//ssTarget = the name of the sheet inside the current workbook you are trying to set data in
//ssRange = the data range you are trying to copy-pasta
Logger.log(ssurl);
var dBase = SpreadsheetApp.getActive().getSheetByName(ssTarget);
var spreadsheetid = SpreadsheetApp.openByUrl(ssurl).getId();
Logger.log(spreadsheetid);
var response = Sheets.Spreadsheets.Values.get(spreadsheetid, dataS + '!' + ssRange);
Logger.log("JSON Values: " + response);
var values = response.values;
var len = values.length;
Logger.log(len);
var start = 2;
var end = dBase.getMaxRows() - start + 1;
var last = dBase.getMaxRows();
dBase.clear();
dBase.deleteRows(start, end);
dBase.insertRowsBefore(1, len);
dBase.deleteRow(last);
SpreadsheetApp.flush();
var retryLimit = 4;
var retryDelay = 1000;
var retry;
for (retry = 0; retry <= retryLimit; retry++) {
try {
var request = {
'valueInputOption': 'USER_ENTERED',
'data': [
{
'range': ssTarget + '!' + ssRange,
'majorDimension': 'ROWS',
'values': values
}
]
};
Sheets.Spreadsheets.Values.batchUpdate(request, SpreadsheetApp.getActiveSpreadsheet().getId())
break;
}
catch (err) {
Logger.log('Failed on try ' + retry + ', exception: ' + err);
if (retry == retryLimit) {
throw err;
}
Utilities.sleep(retryDelay);
}
}
hideSheet(ssTarget);
}
[Deleted User] <[Deleted User]> #119
2. Google is doing nothing to resolve the situation.
3. Very often the problem is solved by creating a new file, transferring the source text to it and working on the new file.
For Google employees:
I wonder if your management is not ashamed to do nothing on this issue for several years?
ye...@luxemporiumusa.com <ye...@luxemporiumusa.com> #120
The main issue seems to be setValues() with large sets of data.
After visiting this page I tried using the Sheets.Spreadsheets.Values.batchUpdate() method recommended by another user which worked for me.
mi...@roche.com <mi...@roche.com> #121
And the script is optimized and only takes Seconds.
The script also worked for several weeks before, then suddenly the issue started and was permanent.
The error was coming from a SpreadsheetApp.flush();
But also happened on any other activity on the gsheet outside of the advanced api (e.g. simple create tab, delete tab etc).
What helped me, at least for now:
Copy the gsheet. Delete old gsheet.
Nothing else solved the issue.
st...@xilectric.com <st...@xilectric.com> #122
I fixed by putting a flush before and after each insert sheet. For example, if I inserted 6 sheets, I originally had just one flush prior to the series of inserts. Now I have 7 flush commands and 6 inserts and it is running again.
ru...@gmail.com <ru...@gmail.com> #123
sc...@ironmountain.com <sc...@ironmountain.com> #124
av...@gmail.com <av...@gmail.com> #125
al...@kiwi.com <al...@kiwi.com> #126
function newMonth() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var last = sheet.getLastRow();
// Loops through all dates on tab newMonth to create the new day logs
for (var i=0; i<last; i++){
var tabname = sheet.getRange(i+1,1).getValue() //get range in column A for naming the tab
var create = ss.insertSheet(tabname); //creates new tabs
}
ga...@sagbrain.com <ga...@sagbrain.com> #127
ra...@mindtickle.com <ra...@mindtickle.com> #128
le...@quintoandar.com.br <le...@quintoandar.com.br> #129
sm...@gmail.com <sm...@gmail.com> #130
There will no fix by Google as they don't do anything to look into problems like this.
I have scripts running on some sheets and they work perfectly fine, but I still receive notification, literally everyday about script Time out error.
I do nothing and It eventually works, Im also using *Sheets.Spreadsheets.batchUpdate()*
My sheets are not that heavy a few tabs (6-7) and a few row (avg 6000 total), and I have been in touch with Google support for months, for them, they keep asking HAR files and links on a loop like I have not sent it to them. And then they send me emails saying our Engineer's are aware of the problem and they are working on a fix. but nothing.
And keep on going like this for months...
Basically good luck.
Airtable might be a tool to look into...
la...@gmail.com <la...@gmail.com> #131
an...@gscript.pro <an...@gscript.pro> #132
Maybe it's time to do something about it ???
Google sends Invoices regularly, but it is in no hurry to FIX own software bugs...
ra...@reelfx.com <ra...@reelfx.com> #133
Has anyone experienced it magically fixing itself after a while? Or is it toast and I actively need to pursue a workaround to get it functioning again?
le...@morrisonsplc.co.uk <le...@morrisonsplc.co.uk> #134
sheet specifically when using setvalue. it does seem to work better when
the script is run via a trigger instead of manually. running manually
sometimes takes forever and the script times out
*___*
*Lee Edwards*
Finance Specialist - Store Reporting
WM Morrisons Supermarkets Limited
On Thu, 10 Nov 2022 at 18:58, <buganizer-system@google.com> wrote:
--
--
*Please note that Wm Morrison Supermarkets PLC is now Wm Morrison
Supermarkets Limited. Please amend your records accordingly.*
Wm Morrison
Supermarkets Limited is registered in England with number 358949. The
registered office of the company is situated at Gain Lane, Bradford, West
Yorkshire BD3 7DL. This email and any attachments are intended for the
addressee(s) only and may be confidential.
If you are not the intended
recipient, please inform the sender by replying to the email that you have
received in error and then destroy the email. If you are not the intended
recipient, you must not use, disclose, copy or rely on the email or its
attachments in any way.
This email does not constitute a contract in
writing for the purposes of the Law of Property (Miscellaneous Provisions)
Act 1989.
Our Standard Terms and Conditions of Purchase, as may be
amended from time to time, apply to any contract that we enter into. The
current version of our Standard Terms and Conditions of Purchase is
available at:
<
Although we have taken steps to ensure
the email and its attachments are virus-free, we cannot guarantee this or
accept any responsibility, and it is the responsibility of recipients to
carry out their own virus checks.
le...@morrisonsplc.co.uk <le...@morrisonsplc.co.uk> #135
[image: image.png]
[image: image.png]
*___*
*Lee Edwards*
Finance Specialist - Store Reporting
WM Morrisons Supermarkets Limited
On Thu, 10 Nov 2022 at 19:01, Lee Edwards <lee.edwards@morrisonsplc.co.uk>
wrote:
--
--
*Please note that Wm Morrison Supermarkets PLC is now Wm Morrison
Supermarkets Limited. Please amend your records accordingly.*
Wm Morrison
Supermarkets Limited is registered in England with number 358949. The
registered office of the company is situated at Gain Lane, Bradford, West
Yorkshire BD3 7DL. This email and any attachments are intended for the
addressee(s) only and may be confidential.
If you are not the intended
recipient, please inform the sender by replying to the email that you have
received in error and then destroy the email. If you are not the intended
recipient, you must not use, disclose, copy or rely on the email or its
attachments in any way.
This email does not constitute a contract in
writing for the purposes of the Law of Property (Miscellaneous Provisions)
Act 1989.
Our Standard Terms and Conditions of Purchase, as may be
amended from time to time, apply to any contract that we enter into. The
current version of our Standard Terms and Conditions of Purchase is
available at:
<
Although we have taken steps to ensure
the email and its attachments are virus-free, we cannot guarantee this or
accept any responsibility, and it is the responsibility of recipients to
carry out their own virus checks.
a....@pa.ag <a....@pa.ag> #136
No, not in my experience. The file is toast and you have to move to a new file. This will work for another year. Rinse, repeat..
ad...@thinkclickget.com <ad...@thinkclickget.com> #137
Exception: Service Spreadsheets failed while accessing document with id <Spreadsheet ID>
case1 . SpreadsheetApp.flush() after moveColumns
case 2. at getRange.getValues()
appears to be random - previous call to getRange.getValues passed with same Spreadsheet ID!! Priority 1 please.
the same code has been working for months, some part for years! and all that code use quite basic operations.
Update: case 1 is a certainty. flush after moveColumns causes this error for sure.
ma...@google.com <ma...@google.com> #138
The cx is still experiencing this issue, if you could please send me an update it would be great.
Thank you in advance.
Cristina
ma...@google.com <ma...@google.com> #139
ke...@gmail.com <ke...@gmail.com> #140
function copyData() {
var sourceSpreadsheetId = "sourceID";
var destinationSpreadsheetId = "destinationID";
var ss = SpreadsheetApp.openById(sourceSpreadsheetId);
var source = ss.getSheetByName("BLVD Raw Data House");
var destination = SpreadsheetApp.openById(destinationSpreadsheetId).getSheetByName("Sheet1");
// Use the advanced service to pull data from the source sheet
var sourceRange = source.getRange("A1:I");
var sourceData = sourceRange.getValues();
// Use the advanced service to paste data into the destination sheet
SpreadsheetApp.flush();
var destinationRange = destination.getRange("A1:I");
destinationRange.setValues(sourceData);
}
UPDATE:
I created an on/off switch on my sheet and made all of the formulas on my sheet run only if the cell was set to "1". If set to "0", the formulas don't run. This allowed me to get to 80k rows (much better than none). Making progress..
function copyData() {
var sourceSpreadsheetId = "SourceID";
var destinationSpreadsheetId = "DestinationID";
var spreadsheet = SpreadsheetApp.getActive();
var sheet = spreadsheet.getSheetByName("Admin"); // "Admin" is the name of the tab with the on/off switch
var cell = sheet.getRange("A2"); //A2 is the cell where the on/off switch is housed
cell.setValue("0");
var ss = SpreadsheetApp.openById(sourceSpreadsheetId);
var source = ss.getSheetByName("BLVD Raw Data House");
var destination = SpreadsheetApp.openById(destinationSpreadsheetId).getSheetByName("BLVD Raw Data");
// Use the advanced service to pull data from the source sheet
var sourceRange = source.getRange("A1:I");
var sourceData = sourceRange.getValues();
// Use the advanced service to paste data into the destination sheet
var destinationRange = destination.getRange("A1:I");
destinationRange.setValues(sourceData);
cell.setValue("1");
}
[Deleted User] <[Deleted User]> #141
destinationRange.setValues(sourceData); ?
If I understand correctly, the destination sheet has complex formulas that
consume the data that you want to update.
Hence, I suggest applying all pending spreadsheet changes only AFTER you
have updated the data, avoiding any latencies during the very update
process.
See reference:
On Fri, 13 Jan 2023 at 00:24, <buganizer-system@google.com> wrote:
ke...@gmail.com <ke...@gmail.com> #142
Reference:
Here is my code which takes about 47 seconds to parse through 120k rows of columns A:I
function batchUpdate() {
//
var sourceID = "sourceID";
var destinationID = "destinationID";
var sheet = SpreadsheetApp.openById(sourceID).getSheetByName("BLVD Raw Data House");
var rowNum = sheet.getLastRow();
console.log("SUCCESS: Gathered source sheet and destination sheet information");
var spreadsheet = SpreadsheetApp.getActive();
var adminsheet = spreadsheet.getSheetByName("Admin"); // "Admin" is the name of the tab
var cell = adminsheet.getRange("A2");
cell.setValue("0");
console.log("SUCCESS: Set formulas to OFF");
// get data in certain range from original sheet
var response = Sheets.Spreadsheets.Values.batchGet(
sourceID, {ranges: ['BLVD Raw Data House!A1:I' + rowNum]});
var values = response.valueRanges[0].values;
console.log("SUCCESS: Gather data from source sheet");
// If your data range is not continuous, your batchGet range will be:
// ranges: ['transaction!A1:C' + rowNum, 'transaction!F1:N' + rowNum, ...]
// response.valueRanges[n].values is the corresponding values of each range
// specify data range and new values we want to set in Backup Sheet
var request = {
'valueInputOption': 'USER_ENTERED',
'data': [
{
'range': 'BLVD Raw Data!A1:I' + values.length,
'majorDimension': 'ROWS',
'values': values
}
]
};
console.log("SUCCESS: Specify data range and new values for the destination sheet");
// Again, if the range to update is not continuous, `data` in the request above will be:
// 'data': [{'range': 'Sheet3!A1:C' + values1.length, 'majorDimension': 'ROWS', 'values': values1},
// {'range': 'Sheet3!F1:N' + values2.length, 'majorDimension': 'ROWS', 'values': values2}, ...]
SpreadsheetApp.openById(destinationID).getSheetByName("BLVD Raw Data").getDataRange().clearContent();
console.log("SUCCESS: Clear contents of destination sheet");
// flush() will force gsheet to apply all pending changes.
// If not added, sometimes update values will run before clearContent :(
SpreadsheetApp.flush();
console.log("SUCCESS: Flush to apply all pending changes");
Sheets.Spreadsheets.Values.batchUpdate(request, destinationID);
console.log("SUCCESS: Batch Update");
cell.setValue("1");
console.log("Set formulas to ON");
}
I hope this helps others out there! Took about 8 hours of trial an error. Again, I'm a novice at best so any tips to making this better I am all about!
ar...@gmail.com <ar...@gmail.com> #143
var protection = range.protect().setDescription('Locked');
protection.removeEditors(users);
When protection.removeEditors(users) it is failing with error message
Exception: Service Spreadsheets timed out while accessing document with id
ma...@bbva.com <ma...@bbva.com> #144
the error appears from nothing specific, I tested it on a few minutes after copy the spreadsheet from the original web app and make the configurations and work fine, but hours later suddenly anyone can access.
We need a real solve to this fix!
[Deleted User] <[Deleted User]> #145
lu...@gmail.com <lu...@gmail.com> #146
a....@pa.ag <a....@pa.ag> #147
jp...@globalpay.com <jp...@globalpay.com> #148
The sheet that pulls the data from another sheet? Or the sheet where the data is being pulled from?
Because I tried the first, and it's the same. It runs out even just on the part where I use SpreadsheetApp.openById(''). This line already fails.
yu...@gmail.com <yu...@gmail.com> #149
al...@xappex.com <al...@xappex.com> #150
jp...@google.com <jp...@google.com>
cl...@gmail.com <cl...@gmail.com> #151
This experience should be a wake-up call to those considering Google as an enterprise platform.
jp...@google.com <jp...@google.com> #152
Some possible workarounds to the issue:
- reduce spreadsheets size: reduce # of cells
- reduce spreadsheets complexity: reduce # of formulas, # of external data dependency (e.g. importrange)
- reduce # of cells to read/write in a single SpreadsheetApp function, e.g. instead reading the entire sheet, read range by range.
mi...@roche.com <mi...@roche.com> #153
I had the same random error even in test gsheets with only one filled cell and a script regularly reading and writing this cell.
I optimized the runtimes (block read to array, calculations in array, block write). But it still happen randomly.
This error for me fixes itself after several tries most of the times.
In the rare cases this error was permanent i chose to ttry manually running it, manually undoing any filter and as a last resort re create the file (duplicate, then delete old).
Bit as i said 99% of the times the issue fixed itself after random reruns.
an...@buildmetrix.au <an...@buildmetrix.au> #154
The problem is over 3 years old!
How long is Google going to ignore this issue?
an...@buildmetrix.au <an...@buildmetrix.au> #155
jp...@google.com <jp...@google.com> #156
Please see the suggestions at
Description
First, please search through existing issues to ensure that the bug has not already been reported. You can start the search here:
If the issue has already been reported, you can click the star next to the issue number to subscribe and receive updates. We prioritize responding to the issues with the most stars. You can also comment on the issue to provide any details of your experience with it.
If your issue has not been reported, please provide all of the following:
-----------------------------------------------------------------------------------------------------------------------------
A short description of the issue: I have a document that pulls data each morning automatically on a trigger. For the past month, about twice a week it fails with ""service spreadsheets timed out while accessing document with id". Sometimes after running it manually when I'm notified, it will fail with the same error message. I have to keep trying it until it works. Nothing new has been added to my code and it fails at different intervals. One of them being under 3 minutes which is far less than the execution quota limit. I'm not the only one experiencing this recently as there are Stack Overflow and reddit posts about this same issue in the past week or so.
A small code sample that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.
I don't have any sample code to share because the error message is so broad, I can't tell what part of the code it doesn't like. I can't reproduce it because sometimes it works and sometimes it doesn't, it's not consistant. I actually don't think the error message is specific to any code, rather than an issue on Google's back-end with excecution. I'm on V8 runtime (which I know is still BETA) if that makes a difference.
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead? If you see error messages, please provide them.
Please provide any additional information below.