I have a simple test google apps script that prints the content of a sheet. It works fine in Safari on Mac but on Chrome I get a blank page with this error in the console:
dropping postMessage.. was from unexpected window
This is the code:
function doGet() {
return HtmlService
.createTemplateFromFile('index')
.evaluate();
}
function getData() {
return SpreadsheetApp
.openById('1vyrKW7ABfCDY-a8H4AZ2JFZwA7lpCEuD6R5x4fJ8_qI')
.getActiveSheet()
.getDataRange()
.getValues();
}
Here is the HTML template:
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<? var data = getData(); ?>
<table>
<? for (var i = 0; i < data.length; i++) { ?>
<tr>
<? for (var j = 0; j < data[i].length; j++) { ?>
<td><?= data[i][j] ?></td>
<? } ?>
</tr>
<? } ?>
</table>
</body>
</html>
And here is the published web app: https://script.google.com/macros/s/AKfycbyYiAlqtqElFeyiWD6yq2zWtzQ1vdJMkHUPOfZrQFvicTO_uXs/exec
It is a known issue with the latest version of Google Chrome. If you open the web app inside Firefox, it would work just fine.
Please star this issue on code.google.com for updates.