1
votes

I'm new to Google Apps Scripts so I was trying to make the simplest script that will work. I want to deploy it as a Web App so it's not tied to another Google App. I've deployed it as a Web App here: https://script.google.com/macros/s/AKfycbzTajd08H_la_0doLv6kc0bq3Ba_5HFBoJtPq5i0gKUu03t6WbN/exec

However, when I go to it I get the error: "We're sorry, a server error occurred. Please wait a bit and try again." How can I fix this? Is my code or project missing something? It does seem too short. My project just has the following Main.gs file:

 function doGet() {
     return HtmlService.createHtmlOutput('<b>Hello, world!</b>');
 }

Nothing shows up in the logs, and I get the same error when I click Run or Debug (with or without breakpoints).

If my attempt is the wrong approach, what is the simplest script that will work?

Thanks.

1

1 Answers

0
votes

I created a new Apps Script, added that code, deployed it, and it ran without any errors. Maybe just delete this file, and try again from the beginning. It's not the code that is the problem. When first learning new code, things like this happen all the time. Not sure what the problem is. You'd need to document every step you took.