DEV Community

ali
ali

Posted on

Solution for Failed to execute 'postMessage' on 'DOMWindow' on Next.js

When I open the Chrome console, I saw the error "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided"

i use react with nextjs and Plyr for embeding youtube
the solution is to delay nextjs auth session refresh rate in SessionProvider

<SessionProvider session={session} refetchInterval={5*60*60}>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)