Errors / JavaScript errors
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided does not match the recipient window's origin
An embedded video or widget tried to talk to its frame before the frame had loaded; usually harmless.
Usually none; at worst the player's controls from the page (autoplay, tracking) do not work.
Why it happens
- Most often a YouTube embed: the player script sends messages to the
youtube.comframe while the frame is stillabout:blankor onyoutube-nocookie.com. - Any code calling
postMessage(data, "https://…")at a frame whose current origin differs from the one given.
How to fix it
- For YouTube, set
origin=in the embed URL to your site, and create the player after its iframe has loaded. - For your own code, wait for the frame's
loadevent, and pass the frame's real origin. - It is logged by the browser and cannot be caught, so error trackers often record it as if it were the site's own error. If every embed plays and responds, filter it out; if a player never starts or its events never arrive, the frame and the script disagree about the origin, and that is worth fixing.
Whose problem it is
Usually another company's script or site, embedded in this one.
Does your site have it?
Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.