If your published add-on fails to add its menu items, look in the browser's JavaScript console to see if an error was thrown, then examine your script to see whether the onOpen(e) function or global variables call services that aren't allowed in AuthMode.NONE.
This can be a possible implementation issue why the menu options are not populated. When your onOpen(e) function runs, the entire script is loaded and any global statements are executed. These statements execute under the same authorization mode as onOpen(e) and fail if the mode prohibits them. This prevents onOpen(e) from running.
You can find more information about this on this link (https://developers.google.com/gsuite/add-ons/concepts/editor-auth-lifecycle#opening).Your code has an error in it.The error is happening before the code even runs.The error is preventing the onOpen function from running.The error doesn't happen when the code runs, it happens when the code is being evaluated for being correct or not.It's an "uncaught" error, meaning that the code editor saved your code even though there is a problem with it.The code editor didn't find the problem, and tell you that there is a problem before the code was saved.That makes it hard to debug of course.The server files in your code are parsed in a certain order, which is the sort order that they are displayed in in the sidebar in the new code editor.Any global variables should be put in a file at the top of the list, or at least somewhere before files that need the global variable.For example, the default file name is Code.gs.That's usually the first file in the list unless you have a file that you named with the first letter of an "A" or a "B".If Code.gs is your first file in the sort order, then you could put your globals at the top of file Code.gs.That would be the easiest solution.Or if nothing in Code.gs needs your globals, then you could create a file for your globals, namedCz_GlobalsWhich would be put in order directly after Code.gs.


Tried this page: https://developers.google.com/workspace/add-ons/how-tos/testing-editor-addons
Steps 6 and onward are only available when running the legacy editor . . . .
So, switch to legacy editor and complete the set-up for testing in both AuthMode.NONE and AuthMode-LIMITED. In both tests, my add-on menu displays as it should and so the add-on loads and is fully functional.
After running several tests in different modes (where all works fine), suddenly the add-on no longer shows in the Add-ons menu . . .
I’ve no idea what else I can do . . . .
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/qC2WLgzLtVY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/25d6e381-5136-45f8-8120-8d4c19771634n%40googlegroups.com.