Google Apps脚本/ GAS,简单的onInstall(e)触发器在AuthMode.NONE中运行

问题描述 投票:1回答:1

根据Google的官方文档,简单的onInstall(e)触发器始终在AuthMode.FULL中运行:

...从商店中安装编辑器加载项时,其onInstall(e)函数在AuthMode.FULL中运行。 ...

来源:https://developers.google.com/gsuite/add-ons/concepts/editor-auth-lifecycle

...实际上,onInstall触发器始终在AuthMode.FULL中运行,...

来源:https://developers.google.com/gsuite/add-ons/editors/slides/quickstart/progress-bar

尽管如此,我仍在Stackdriver Logging中找到了与该日志相似的日志:

错误5:{“消息”:“执行该操作需要授权”,“名称”:“异常”,“文件名”:“ myProjectFILE(MYPROJECT)”,“ lineNumber”:38,“堆栈”:” \ tat myProjectFILE(MYPROJECT):38(createSheetOnInstall)\ n \ tat myProjectFILE(MYPROJECT):1138(checkForExistingSheet)\ n \ tat myProjectTRIGGERFILE(MYPROJECT):3(onInstall)\ n“}; e:{“ authMode”:{}}; authMode:NONE

我正在记录实际错误以及authMode的值。我已经用粗体突出显示了堆栈中的第一个函数onInstall(e)和authMode,即NONE。

怎么会这样?

google-apps-script google-apps-marketplace chrome-web-store google-apps-script-addon
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.