Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
675 views
in Technique[技术] by (71.8m points)

function - Google Sheets Scripts suddenly stop working - Error: "Service not found: plus v1"

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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"
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...