Assigned
Status Update
Comments
jp...@google.com <jp...@google.com> #2
Generated Metadata
- Summary: The Apps Script project is unexpectedly requesting the
script.container.ui
authorization scope when the word 'show' is present in a comment andSpreadsheetApp.getActive()
is invoked. This behavior is unexpected and should be investigated. - Tags:
Additional resources:
https://stackoverflow.com/.../unexpected-error-while-getting-the-method-or... https://stackoverflow.com/.../were-sorry-a-server-error-occurred-while-read... https://stackoverflow.com/.../google-add-on-script-throws-server-error-whe... https://stackoverflow.com/.../authorisation-is-required-to-perform-that-actio... https://stackoverflow.com/.../permission-denied-when-trying-to-create-a-spr...
bl...@google.com <bl...@google.com> #3
Automated by Blunderbuss job workspace-devrel-public-issue-tracker-blunderbuss-autoassigner for config assign for component 191640.
jp...@google.com <jp...@google.com> #5
I have reported this to the engineering team and future updates will be shared here. Thank you for your patience.
er...@gmail.com <er...@gmail.com> #6
A workaround is to manually specific scopes. https://snpchatpro.com/
Description
Before opening a new issue, please search for other related issues , click the ★ to subscribe to updates, and click
+1
to vote.Description
While making some minor edits to an existing and functional project, it suddenly requested a new permission forhttps://www.googleapis.com/auth/script.container.ui (display and run third-party web content in prompts and sidebars inside Google applications). After some time, I isolated it to the presence of the word 'show' (lowercase) in a comment, along with the presence of SpreadsheetApp.getActive() triggers the request for authorization.
Code
function myFunction() { let spreadSheet = SpreadsheetApp.getActive(); // show }
Output
Request for authorization and inclusion ofhttps://www.googleapis.com/auth/script.container.ui in permission scope
Steps
Open an incognito window and log into google sheets.
Create a new sheet, then go Apps Script to create a new script.
Enter in the code above, save, and check permission scopes.
Permission scopes will includehttps://www.googleapis.com/auth/script.container.ui . If you remove the word 'show', it will remove that permission. The word can be anywhere in a sentence, anywhere in the code, but seems to only trigger the authorization scope if the SpreadSheetApp.getActive() method is invoked.