title: Failed to execute PostMessage on DOMWindow using apps script
body: <p>I am getting the following error message occasionally when I open my web-app with apps script.</p>
  
  <p><strong>Need to clarify two questions</strong></p>
  
  <ul>
  <li>What is this error? </li>
  <li>How do I fix it? </li>
  </ul>
  
  <p>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.  </p>
  
  <pre><code>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').
  </code></pre>
  
  <p>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.  </p>
  
  <pre><code> &lt;script   src="https://code.jquery.com/jquery-3.1.0.js"   integrity="sha256-slogkvB1K3VOkzAI8QITxV3VzpOnkeNVsKvtkYLMjfk="   crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;script   src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"   integrity="sha256-0YPKAwZP7Mp3ALMRVB2i8GXeEndvCq3eSl/WsAl1Ryk="   crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" /&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"&gt;&lt;/script&gt;
  </code></pre>