I wrote a Google Sheet editor add-on 1 year ago that I have been using ever since for my personal use. I didn't end up publishing it.
I have always used it with the same spreadsheet, launching with the legacy editor's "Run -> Test as add-on" giving it the Installed and Enabled authorization (I have a saved config for this). It worked like a charm, there is even some checking in the onOpen for whether it is Enabled for the doc.
Today it stopped working without me making any changes. Simply the add-on doesn't seem to load. The spreadsheet opens but the add-on is not invoked. I see no new executions in the logs and the add-on is neither loaded in the menu nor is the popup rendered which should if it is not Enabled. It seems like the Test as Add-on feature is broken. Tried it also with another spreadsheet that's compatible with the add-on with the same result. I even tried to create a net new test config with Installed and Enabled and got the same result.
Anyone experienced the same issue with Google Sheet editor add-ons run with "Test as add-on"? Any known workarounds or solutions to make it load again?
This the screen shot of my test settings showing that the add-on is configured to be Enabled for the document.
Here is my code snippet from onOpen that should catch if the add-on is not enabled:
//Testing if the add-on is enabled against a compatible doc. Otherwise show welcome message with instructions.
var ret = null;
try{
ret = SpreadsheetApp.getActive().getRangeByName("TOTAL_RETAINED_VALUE");//Check if critical named range is defined.
} catch (e){}//If the add-on is not enabled on the doc this call will throw an unauthorized excepton.
if (ret == null)
ui.alert("Welcome to the XXx add-on", "This add-on helps you XXX... more instructions on how to fix this issue", ui.ButtonSet.OK);