google-apps-marketplace

Menu item not appearing in G Suite Marketplace published Sheets Add-on


We tested and submitted a Sheets Add-on, which has now been published and is available in the G Suite Marketplace (project: 881100375084). But the menu item for the Add-on is not created after installation. It works fine in testing.

There are no global variables being declared in the script. We're not seeing any logging in stackdriver. If there's an error, we're not able to see it. This is the code we're using to create the menu item:

function onInstall(e) {
    console.log('running onInstall');
    onOpen(e);
}

function onOpen(e) {
    console.log('running onOpen in mode:');
    console.log(e.authMode);
    SpreadsheetApp.getUi()
        .createAddonMenu()
        .addItem('Import', 'openSidebar')
        .addSeparator()
        .addItem('Help', 'showHelp')
        .addToUi();
}

We have tried switching the G Suite project config from using the "Project key (Deprecated)" instead of the Script ID as suggested here but it doesn't seem to make a difference. We have been waiting a couple of hours between code updates to the Add-on trying to debug the issue, but really have no idea if the app is loading the most recent version of the code. The docs say it takes "some time".

Anyone have any ideas how to debug this and get the menu items to show?


Solution

  • I work in the G Suite Marketplace and took a look at your add-on. The problem was that the script version was "Version X" but it should have been just "X" (where X is a number). I've fixed it and confirmed that it now shows in the Add-ons menu.

    I've also created an internal issue to validate that the script version is a number. Thanks for you report!