I made a google sheets add on and it worked well. Then I published it privately so that others in my organization can have access to it. However the custom menu that is supposed to be added to the add-on menu does not show up and I only see the default Help item through my add-on menu. When I open logging, it shows that both my onInstall and onOpen failed. I can't see any error messages anywhere though.
This is the code in my script calling the development version of my custom library.
let sheet = SpreadsheetApp.getActiveSheet();
function GetFromPlaylistIdYoutube()
{
YoutubeLibrary.GetFromPlaylistIdYoutube(sheet);
}
function onInstall(e) {
onOpen(e);
}
function onOpen(e) {
var ui = SpreadsheetApp.getUi();
// Or DocumentApp or FormApp.
ui.createAddonMenu()
.addItem("From Playlist ID", "GetFromPlaylistIdYoutube")
.addToUi();
}
These are the logs that I see when I install and reload my google sheets.
Does anyone know why it is failing while it is working just fine when I don't publish it. For reference please note that this add-on script is a standalone script.