You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a conversation where Romain and Jean-Remi mentioned this repo while I was researching about an add-on error message, more explicitely about "You do not have permission to call showSidebar at functionName (fileName: lineNumber)". This error occurs on add-ons triggers created by user A from mydomain.com that are activated by actions made by user B from domain otherdomain.com when functionName tries to open a sidebar.
Are this kind of errors something of interest for you?
I didn't tried yet this library but if this error message isn't catched could I ask about it here?
Something like the following should help to reproduce the error message.
function onInstall(event) {
onOpen(event);
}
function onOpen(event){
SpreadsheetApp
.getUi()
.createAddonMenu()
.addItem('Add trigger', 'addTrigger')
.addItem('Remove all triggers', 'removeTriggers')
.addToUi();
}
function addTrigger(){
ScriptApp.newTrigger('respondeToSpreadsheetEdit')
.forSpreadsheet(SpreadsheetApp.getActive())
.onEdit()
.create();
SpreadsheetApp.getUi().alert('Trigger added.');
}
function respondeToSpreadsheetEdit(event){
var html = '<p>Hello world!</p>';
var title = 'Sidebar title';
var userInterface = HtmlService.createHtmlOutput(html)
.setTitle(title);
SpreadsheetApp.getUi().showSidebar(userInterface);
}
function removeTriggers(){
var triggers = ScriptApp.getProjectTriggers();
triggers.forEach(function(trigger){
ScriptApp.deleteTrigger(trigger);
});
SpreadsheetApp.getUi().alert('All triggers were removed.');
}
Steps to reproduce the error message
Publish the above code as a Google Sheets add-on
User A install the add-on, click on Add-ons > Add-on name > Add trigger
User A shares the spreadsheet with user B
User B edit cell A1
Open the Stackdriver log for the add-on. There you will find something like the following:
You do not have permission to call showSidebar at respondToSpreadsheetEdit(Code:n)
where n is the code line number for SpreadsheetApp.getUi().showSidebar(userInterface);
P.S. Spanish version of the error message
No cuenta con el permiso para llamar a showSidebar at respondeToSpreadsheetEdit(Código:27)
I found a conversation where Romain and Jean-Remi mentioned this repo while I was researching about an add-on error message, more explicitely about "You do not have permission to call showSidebar at functionName (fileName: lineNumber)". This error occurs on add-ons triggers created by user A from mydomain.com that are activated by actions made by user B from domain otherdomain.com when functionName tries to open a sidebar.
Something like the following should help to reproduce the error message.
Steps to reproduce the error message
where
n
is the code line number forSpreadsheetApp.getUi().showSidebar(userInterface);
P.S. Spanish version of the error message
Related issue on the Apps Script Issue Tracker
The text was updated successfully, but these errors were encountered: