react-youtube icon indicating copy to clipboard operation
react-youtube copied to clipboard

Working, but Errormessage in console

Open Ellstrom opened this issue 4 years ago • 8 comments

Hello! Your app is working very well, however I get an error message in the console: "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('<URL>') does not match the recipient window's origin ('<URL>').

Do you know any workaround for this?

Ellstrom avatar Apr 12 '20 14:04 Ellstrom

same here. in my case

The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('http://localhost:3000')

xoxwgys56 avatar Apr 17 '20 06:04 xoxwgys56

i am using ReactJS

they said it is https issue. https://stackoverflow.com/questions/27573017/failed-to-execute-postmessage-on-domwindow-https-www-youtube-com-http hope it help you.

by the way i don't know how can i change https on localhost.

xoxwgys56 avatar Apr 17 '20 06:04 xoxwgys56

Same issue here, this is occurring on my localhost. Will update to see if the issue persists when I push changes to a hosted HTTPS site.

cjmaria avatar Apr 21 '20 16:04 cjmaria

+1

fabioginzel avatar May 10 '20 20:05 fabioginzel

+1

robinleboe-sw avatar Jun 14 '20 21:06 robinleboe-sw

+1, @cjmaria any info regarding this ?

anurbecirovic avatar Jun 30 '20 10:06 anurbecirovic

I had the same error, fixed it by setting origin to window.location.origin as suggested in one of the answers here: https://stackoverflow.com/questions/27573017/failed-to-execute-postmessage-on-domwindow-https-www-youtube-com-http

playerVars: {
    origin: window.location.origin,
},

ashteya avatar Jul 05 '20 07:07 ashteya

@ashteya Still the same console error :/

anurbecirovic avatar Jul 06 '20 10:07 anurbecirovic