apps-script-samples icon indicating copy to clipboard operation
apps-script-samples copied to clipboard

doGet(e) HtmlService.createHtmlOutput returning broken GDrive page on Safari

Open derrickrc opened this issue 4 years ago • 3 comments

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

  1. Create a script file and paste in the following code: function doGet(e){ return HtmlService.createHtmlOutput("Hello world!") }

  2. Publish the script and set it to run as yourself and public to anyone, even anonymous

  3. Attempt to open the script link in a Safari browser

Google Drive Error

derrickrc avatar Jul 07 '20 15:07 derrickrc

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

derrickrc avatar Jul 07 '20 18:07 derrickrc

Please see https://issuetracker.google.com/issues/160622846

labnol avatar Jul 08 '20 08:07 labnol

The issue has been fixed and your web app should be working again.

labnol avatar Jul 08 '20 12:07 labnol