1

I am getting the following error message occasionally when I open my web-app with apps script.

Need to clarify two questions

  • What is this error?
  • How do I fix it?

I need this website to run consistently obviously so I am willing to start a bounty in a few days if the solution is not obvious. I make many calls to google.script.run functions.

Failed to execute 'postMessage' on 'DOMWindow': 
The target origin provided 
('https://n-j3xfpwqmogabbvlhsvezfcvbljow7bq45m6qoky-0lu-script.googleusercontent.com') 
does not match the recipient window's origin ('null').

Edit: I should probably mention that my app contains jquery, but when I remove the script and Css tags below there is no overall effect. It just simply is not loading sometimes for no apparent reason.

 <script   src="https://code.jquery.com/jquery-3.1.0.js"   integrity="sha256-slogkvB1K3VOkzAI8QITxV3VzpOnkeNVsKvtkYLMjfk="   crossorigin="anonymous"></script>
  <script   src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"   integrity="sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk="   crossorigin="anonymous"></script>
  <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
  <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30
IntegrateThis
  • 853
  • 2
  • 16
  • 39

1 Answers1

2

Based from the error Failed to execute postMessage on DOMWindow you might not properly configured your credentials from Google API console or you are trying to run your script from the file system instead of web server even running on localhost

Just make sure that posting message is loaded. Most of the time this error occurred when sending messages failed to load.

Try to check workaround suggested by community here: SOTicket1 or SOTicket2.

Community
  • 1
  • 1
Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30