Status Update
Comments
xa...@google.com <xa...@google.com> #2
Hello,
Thank you for the details. This has been forwarded internally.
Best regards
[Deleted User] <[Deleted User]> #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
cm...@google.com <cm...@google.com> #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.
cm...@google.com <cm...@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
cm...@google.com <cm...@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) ;
};
[Deleted User] <[Deleted User]> #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`);
}
cm...@google.com <cm...@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);
}
cm...@google.com <cm...@google.com> #11
cm...@google.com <cm...@google.com> #12
[Deleted User] <[Deleted User]> #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).
cm...@google.com <cm...@google.com> #15
cm...@google.com <cm...@google.com> #16
Tried duplicating the document. Problem gone. (So far; knock on wood.)
cm...@google.com <cm...@google.com> #17
[Deleted User] <[Deleted User]> #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");
}
cm...@google.com <cm...@google.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");
}
[Deleted User] <[Deleted User]> #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}
cm...@google.com <cm...@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
}
}
[Deleted User] <[Deleted User]> #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');
}
Description
AGP 3.6.0-alpha05
Kotlin 1.3.41
I have a Fragment that references to a layout, and the `compileDebugKotlin` task is failing with "Unresolved reference: diamondTier", where diamondTier is an included layout like:
```
<include
android:id="@+id/diamondTier"
layout="@layout/upgrade_screen_diamond"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
```
Referenced like:
```
class UpgradeFragment : androidx.fragment.app.Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val diamondTier = view.findViewById<TierLayout>(R.id.diamondTier)
```