Google Script App Fails in Incognito Mode

后端 未结 2 1972
执念已碎
执念已碎 2020-12-06 09:03

I have a simple Google Script published as a web app with anonymous access. The code is available here and the web app is available here.

code.gs

相关标签:
2条回答
  • 2020-12-06 09:13

    Yes it is consistently reproducible in a new project.

    I have the same problem... It is related to the HtmlService

    The app script was workng for about a year, but yesterday started to return the error "Google Docs encountered an error".

    return HtmlService.createHtmlOutput("<p>Hello World</p>");
    

    If I login it works, however the script is meant to return dynamic list as html when people visit my website, hence why it is needed to run as "as anyone, even anonymous".

    Partial Workaround:

    Some of my scripts are API's returning just strings, the workaround for these is to use ContentService instead of HtmlService.

    return ContentService.createTextOutput("Hello World");
    
    0 讨论(0)
  • 2020-12-06 09:32

    Thank you for looking into this issue.

    It looks like a problem at Google's end and they have acknowledged the bug as well. We'll have to wait until they issue fix.

    Update: Looks like Google has rolled out an update and the issue is automatically resolved. The web app is now working as before.

    0 讨论(0)
提交回复
热议问题