I'm trying to add to a sheet a custom dialog box created from HTML template, and nothing I do has any outcome but this error: "We're sorry, a server error occurred. Please wait a bit and try again."
To eliminate all chances of error on my part, or conflict with anything I'd already written, I put aside my project, and started over with a blank spreadsheet. I added to it absolutely nothing but the code Google recommends at https://developers.google.com/apps-script/guides/html/templates
function doGet() {
return HtmlService
.createTemplateFromFile('Index')
.evaluate();
}
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
Hello, World! The time is <?= new Date() ?>.
</body>
</html>
I'm STILL getting the error. Apart from a very simple Custom Menu that enables you to invoke this function, there isn't a thing in my code apart from this function and HTML copied and pasted from Google Developers. I have tried some of the other examples on that page, but no matter what function I try, the result is this same cryptic error message.
Here is the Google Sheet; see if you can get that function "Do Get" to work: https://docs.google.com/spreadsheets/d/1RpbYryy0El80oj-07Q21cbtRr8gPDCjrwPbHbBF4Zr0/edit#gid=0