我已经部署了一个电子表格绑定脚本作为附加组件。
当它是容器绑定时它起作用了。
但现在,作为附加组件,当我调用 DriveApp.getFolderById 时,我收到服务器错误
function makeMap (){
console.log("start lesmap");
try{var map=DriveApp.getFolderById(DIPmapId); }catch(e){console.log("error map:"+e )}
try{var temp=DriveApp.getFileById(templateId);}catch(e){console.log("error tempfile:"+e) }
}
抛出错误(荷兰语,意思是:服务器错误,请稍等片刻,然后重试):
2020-05-23 12:10:11.310 中欧夏令时
错误图:异常:Er is helaas een serverfout opgetreden。观察时间和探测器的变化。
2020-05-23 12:10:11.347 中欧夏令时
错误临时文件:异常:Er is helaas een serverfout opgetreden。观察时间和探测器的变化。
在清单文件中:
{
"timeZone": "Europe/Paris",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/script.container.ui"
]
}
在 G Suite Marketplace SDK 配置中
OAuth 2.0 范围
https://www.googleapis.com/auth/userinfo.email
https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/script.container.ui
https://www.googleapis.com/auth/drive
我已在电子表格中安装并启用它。
我在电子表格的附加菜单中运行该函数,所以我猜这是在完整的授权模式下?
我对云端硬盘中的地图和文件拥有编辑权限。
我缺少什么?