'Bound menu not running library script

I have a number of custom menu items on a Google Sheet, one of which is designed to run a library script (deployed WebApp script). I have added the library script's ID to the Bound script's Libraries (accessed under the the bound script's Resources tab).

The code to call that library in the bound script is:

.addItem('Write New', 'NewLibraryApp.doGet')//Runs library script to create new document

But the library code never gets executed. What does run is:

[20-02-18 04:44:28:930 PST] Starting execution
[20-02-18 04:44:28:940 PST] HtmlService.createHtmlOutputFromFile([index2]) [0 seconds]
[20-02-18 04:44:28:941 PST] HtmlService.HtmlOutput.getContent() [0 seconds]
[20-02-18 04:44:28:941 PST] HtmlService.HtmlOutput.getTitle() [0 seconds]
[20-02-18 04:44:29:000 PST] Execution succeeded [0.002 seconds total runtime]

By the way, the library code does run and works perfectly when triggered from the Web App test link. I have not included the library code here for brevities sake, but it has two functions: a doGet function and then the createDoc function.

function doGet() {
  return HtmlService.createHtmlOutputFromFile('index2');
}

function createDoc(uObj) {
  var userId = uObj.userId;
etc. 

Any ideas why this is failing?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source