apps-script-samples
apps-script-samples copied to clipboard
doGet(e) HtmlService.createHtmlOutput returning broken GDrive page on Safari
Expected Behavior
Showing the HtmlOutput
Sample URL: https://script.google.com/macros/s/AKfycbxah2o9J4J890ZrR7elB1XPZD4mKuYpScvGiFpkbJvLVnKBqRs4/exec
Description:
Actual Behavior
Works on Chrome fine, on Safari on iOS and OSX it returns broken GDrive page (see attached). Last night I was able to get it to work intermittently, this morning it's consistently showing broken. I thought it had something to do if you'd viewed the same link in the same tab, but even after closing the tab this morning it's not resolving.
Steps to Reproduce the Problem
-
Create a script file and paste in the following code: function doGet(e){ return HtmlService.createHtmlOutput("Hello world!") }
-
Publish the script and set it to run as yourself and public to anyone, even anonymous
-
Attempt to open the script link in a Safari browser
I have further isolated this to a browser window where the user is not logged in to any Google account, even though the script is published as anyone, even anonymous. Someone is also facing this same issue: https://stackoverflow.com/questions/62770318/google-script-app-fails-in-incognito-mode
Please see https://issuetracker.google.com/issues/160622846
The issue has been fixed and your web app should be working again.