3

Using a simple implementation of Google's share button I'm getting the following message:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://accounts.google.com') does not match the recipient window's origin ('https://mydomain').

The implementation is like this one:

<!-- Place this tag in your head or just before your close body tag. -->
<script src="https://apis.google.com/js/platform.js" async defer>
  {lang: 'es'}
</script>

<!-- Place this tag where you want the share button to render. -->
<div class="g-plus" data-action="share" data-height="24" data-href="https://mydomain"></div>

Some additional notes on this issue:

  • This implementation is been working for years and with no changes we started to receive this console error.
  • The error does not affect the correct behaviour of the Share Button.
  • The error stops to be showed if, clicking the Share Button, the iFrame opens and I log into Google.
  • If <div class="g-plus" data-action="share" data-height="24" data-href="https://mydomain"></div> is not placed on the DOM, the error stops to be shown.
  • This situation happens on Mac/Windows and Chrome/Firefox/Edge... Safari seems to be an exception and works properly.

Is anyone having this same issue or does anyone have more information about it?

Nakilon
  • 34,866
  • 14
  • 107
  • 142
Gorka
  • 43
  • 7
  • 1
    I reported it here: https://github.com/google/google-api-javascript-client/issues/46#issuecomment-367508405 – mayrop Feb 21 '18 at 23:13
  • Thanks @mayrop , just checked your post. – Gorka Feb 22 '18 at 17:42
  • 1
    This error can be ignored for now as it doesn't prevent normal functioning of the share button. We're investigating why this has started to be raised. – TMSCH Feb 23 '18 at 02:36

0 Answers0