错误:“找不到服务:加上 v1"在项目中运行任何脚本.如何解决? [英] Error: "Service not found: plus v1" on running any script in a project. How to resolve?
问题描述
我构建了一个 Google 表格文档,其中内置了大量脚本和触发器.
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 does not work.
当我尝试运行任何脚本时,我收到以下消息:找不到服务:加上 v1"
When I try to run any script, I get this message: "Service not found: plus v1"
有趣的是,另一个使用大部分相同编码的 Google 表格文件仍然可以完美运行.
What is interesting is that another google sheet file that uses much of the same coding still works perfectly.
我还收到一条消息:此项目正在我们由 Chrome V8 提供支持的新 Apps Script 运行时上运行".我不确定这是否与它有关.
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.
我对脚本进行了搜索,并在名为 appsscript.json 的新选项卡上找到了此代码
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?
推荐答案
您或对您的脚本具有编辑权限的任何人都启用了已弃用的服务 - 在这种情况下,Google 加服务.此服务已弃用并关闭.在新编辑器中,
You or anyone with edit access to your script has enabled a deprecated service - in this case, Google plus service. This service is deprecated and shutdown. In new editor,
- 点击设置图标 >>>显示清单appsscript.json".
- 该文件将在代码文件"中可见.标签
- 您可以修改清单、appsscript.json 以从
enabledAdvancedServices
数组中删除有问题的高级服务.
- Click settings icon >>> Show manifest "appsscript.json".
- And the file will be visible in code "Files" tab
- You can modify the manifest, appsscript.json to remove the offending advanced service from
enabledAdvancedServices
array.
{
"timeZone": "America/Denver",
"dependencies": {
"enabledAdvancedServices": [{
"userSymbol": "Drive",
"serviceId": "drive",
"version": "v2"
}]
},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}
删除此块:
{
"userSymbol": "Plus",
"serviceId": "plus",
"version": "v1"
},
这篇关于错误:“找不到服务:加上 v1"在项目中运行任何脚本.如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!