Google Apps Script "Unsupported add-on"

542 Views Asked by At

Background:

I started a new Google Apps Script project on November 1, 2018. The project creates a custom GMail add-on. Things were working. Then, on November 14th, Google released some features for the CardService:

The Card service has been extended with the following new classes and methods that let you to customize the background of text button widgets: TextButtonStyle TextButton.setBackgroundColor(backgroundColor) TextButton.setDisabled(disabled) TextButton.setTextButtonStyle(textButtonStyle)

So, I started using some of these (poorly documented) new features. As an example:

CardService.newTextButton()
              .setTextButtonStyle(CardService.TextButtonStyle.FILLED)
              .setText("Filled Button Verb")

This was appended to a CardService CardSection that was totally fine. When saving this code, the GMail Custom Add-on displayed the following error message:

Unsupported add-on Please refresh the Gmail app to use this Add-on.

  • I try refreshing the page: get same error message.
  • I quit chrome and reload the page: get same error message.
  • I load incognito tab: get same error message.
  • I MANUALLY COPY AND DEPLOY the project: get same error message.

When the code is removed and saved, the error message goes away and the Custom Add-on works as it did before.

enter image description here

1

There are 1 best solutions below

1
On

Your code helped me to get this to work.

I ensured my app is upgraded to a Google cloud project (GCP). This means it's a gsuite add-on, and not a script Gmail add on. It looks like they're transitioning from script apps to gsuite.

Maybe this was the reason you were struggling?!