Google Apps脚本 - AuthMode - 安装后没有任何菜单可见 [英] Google Apps Script - AuthMode - no menus are visible after installation
问题描述
以下是Google Docs ux团队所说的内容:
My app has been approved, and I am at the final approval that requires addon installation testing.
我的应用已获批准,而且我最终获得批准,需要进行插件安装测试。 b
$ b
Here is what Google Docs ux team says
authMode设置似乎有问题 - 可能在
onOpen函数中,这导致菜单项只出现在
first doc附加组件安装在其他所有文档中都显示为空
(附加屏幕截图)更多信息:
https://developers.google.com/apps-script/add-ons/lifecycle#opening
以下是一个未解决的类似问题 Google Add-on在限制模式应用程序脚本中添加菜单项
现在,我在onOpen和onInstall中没有做任何特别的事情,只是教科书东东。有小费吗? (编辑菜单标题...)
Here is an unresolved similar issue Google Add-on adding menu items in limited mode app scripts Now, I am not doing anything special in onOpen and onInstall, just textbook stuff. Any tips? (redacted the menu titles...)
function onOpen(e) {
DocumentApp.getUi().createAddonMenu()
.addItem('menu1...', 'showSidebar')
.addItem('Buyxxxxx', 'showSales')
.addItem('Getting Started', 'showIntro')
.addToUi();
}
/**
* Runs when the add-on is installed.
*
* @param {object} e The event parameter for a simple onInstall trigger. To
* determine which authorization mode (ScriptApp.AuthMode) the trigger is
* running in, inspect e.authMode. (In practice, onInstall triggers always
* run in AuthMode.FULL, but onOpen triggers may be AuthMode.LIMITED or
* AuthMode.NONE.)
*/
function onInstall(e) {
onOpen(e);
}
推荐答案
href =https://developers.google.com/apps-script/guides/menus =nofollow> https://developers.google.com/apps-script/guides/menus
The warning here helped https://developers.google.com/apps-script/guides/menus
需要查看控制台是否有错误,并且我找到了一个:
Need to look at console for errors, and I found one:
Google Apps脚本:您无权调用getPublicCache
Google Apps Script: You do not have permission to call getPublicCache
这篇关于Google Apps脚本 - AuthMode - 安装后没有任何菜单可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!