Script function not found: doGet

前端 未结 3 1974
面向向阳花
面向向阳花 2021-01-13 11:22

I keep getting this error message when I try to click \"Test web app for your latest code.\" in the Publish dialog box.

But I haven\'t defined any function called do

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-13 12:04

    Every webapp in Google Apps Script must have a main function called doGet() which is the entry point of the app, the function that your app will start with when you type the webapp url.

    This is true for every application deployed as a standalone app and called by its url - with a user interface or not.

    If you read the documentation you'll see that all the standalone apps examples for HTMLService or UiApp have a doGet function.

    Only container embedded ui scripts or scripts that run on triggers are not concerned by this rule.

    Knowing that, the error message you get is probably more meaningful isn't it ?

提交回复
热议问题