“You do not have permission to call showModalDialog”

后端 未结 2 1186
轻奢々
轻奢々 2021-01-26 08:46

We first noticed this issue Friday, June 8. It could have been lurking for some time before that, as we don\'t use the add-on frequently. We first saw it running \"Test as add-o

相关标签:
2条回答
  • 2021-01-26 09:16

    From comment #65 to Critical: Google Docs Add ons show error "You do not have permission to call showSidebar"

    Hello,

    We have introduced a new scope - "https://www.googleapis.com/auth/script.container.ui". For most add-ons the new scope requirement should have been added to the add-on automatically. In this case Apps Script did not detect that the add-on requires the scope because the reference to the top level bean "SpreadsheetApp" is in a different file than the function "showSidebar()". In order to resolve similar issues, developers should ensure both top level bean and bean method are referenced in the same file or explicitly declare all scopes requirements in the manifest. For more information on explicit scopes, please reference https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes.

    Thanks, Peter


    Yes, this is a known issue as there are several recent issues on the Google Apps Script Issue Tracker like the following:

    • Critical: Google Docs Add ons show error "You do not have permission to call showSidebar"
    • Error "You do not have permission to call showSidebar" in onOpen and onEdit
    0 讨论(0)
  • 2021-01-26 09:32

    The issue is still not fixed by Google, even adding the googleapis.com/auth/script.container.ui the scope did not change anything for me, but I found a different way :

    All you have to do is manually creating the onEdit trigger in your Project's triggers, the scope will, therefore, be effective. It worked for me and the problem might be coming from the fact that you use a Simple Trigger and not an Installable one.

    0 讨论(0)
提交回复
热议问题