Google App Script postMessage does not match recipient window's origin

元气小坏坏 提交于 2020-03-22 10:27:12

问题


I have a Google App Script deployed as a Web application.

It was working normally, until this evening I discovered it would not load in Firefox or Chrome.

In Firefox I am getting this message;

Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘https://n-...-0lu-script.googleusercontent.com’) does not match the recipient window’s origin (‘https://script.google.com’). Removed part of URL

The app is deployed: (Executing as myself, and is Accessible for anyone, even anonymous).

I thought the issue might be with LastPass as mentioned here, but I have disabled LastPass in both browsers and the issue persists.


回答1:


I'm not sure if this is a bug or a feature, but web apps starting in Chrome 60 may need to be set to XFameOptionsMode.ALLOWALL. I have a long running web app that just broke. Setting this worked.
XFrame Options Docs



来源:https://stackoverflow.com/questions/45563988/google-app-script-postmessage-does-not-match-recipient-windows-origin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!