问题
I built a Google Sheets document that has lots of scripts and triggers built into it.
It worked for the last year flawlessly until recently. Now every Function does not work, even for other users. Even simple functions such as this does not work:
function clearForm() {
var sheet = SpreadsheetApp.getActive().getSheetByName('Manifest');
sheet.getRange('B4:F4').clearContent();
sheet.getRange('B7:C10').clearContent();
sheet.getRange('D14:D28').clearContent();
sheet.getRange('D30').clearContent();
sheet.getRange('D36').clearContent();
sheet.getRange('F14:F28').clearContent();
sheet.getRange('F30').clearContent();
sheet.getRange('F36').clearContent();
sheet.getRange('H14:H28').clearContent();
sheet.getRange('H30').clearContent();
sheet.getRange('H36').clearContent();
sheet.getRange('J14:J28').clearContent();
sheet.getRange('J30').clearContent();
sheet.getRange('J36').clearContent();
sheet.getRange('E4').setValue('Select Tail #');
sheet.getRange('B42:C42').clearContent();
}
When I try to run this script or any script, I get this message: "Service not found: plus v1"
What is interesting is that another google sheet file that uses much of the same coding still works perfectly.
I also get a message: "This project is running on our new Apps Script runtime powered by Chrome V8". I am not sure if that has anything to do with it or not.
EDIT:
I did a search on the Scripts and found this code on a new tab called appsscript.json
{
"timeZone": "America/Denver",
"dependencies": {
"enabledAdvancedServices": [{
"userSymbol": "Plus",
"serviceId": "plus",
"version": "v1"
}, {
"userSymbol": "Drive",
"serviceId": "drive",
"version": "v2"
}]
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}
I do not know what this code is for and I dont recall writing it. Can I safely delete it?
回答1:
You or anyone with edit access to your script has enabled Google plus service. This service is deprecated and shutdown. You can modify the manifest, appsscript.json to remove it.
{
"timeZone": "America/Denver",
"dependencies": {
"enabledAdvancedServices": [{
"userSymbol": "Drive",
"serviceId": "drive",
"version": "v2"
}]
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}
来源:https://stackoverflow.com/questions/60467021/google-sheets-scripts-suddenly-stop-working-error-service-not-found-plus-v1