daily-co / daily-js

https://docs.daily.co/reference/daily-js
BSD 2-Clause "Simplified" License
103 stars 33 forks source link

DOMException: Failed to execute 'postMessage' on 'Window' #241

Open Galera-Co opened 9 months ago

Galera-Co commented 9 months ago

Expected behavior

Daily prebuilt widget loaded

Describe the bug (unexpected behavior)

On all versions higher than 0.40.0 receiving "DOMException: Failed to execute 'postMessage' on 'Window': # could not be cloned."

Also on more fresh versions also receiving: "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided does not match the recipient window's origin

Steps to reproduce

Load the widget via standard: this.callFrame = DailyIframe.createFrame(callWrapper, { showLeaveButton: true, showFullscreenButton: true })

mattieruth commented 9 months ago

Hi! Thanks for the report. For some reason I am unable to reproduce the error you describe, but typically when we see this error it's because the code is not being run with a server (most commonly when running a local file in a browser with file://. If this is what's happening, you simply need to serve up your folder with a basic server while testing. If not, please provide more information like what browser/OS, when you see the error (on join()? or immediately?), and a copy of your console logs.

Thank you!

mattieruth commented 9 months ago

Actually, apologies, I just saw specifically the # could not be cloned. This means somewhere we're trying to send something that can not be serializable to JSON. Can you let me know what daily call is triggering this error and what parameters you are passing in?

Thank you!

lscown commented 4 months ago

Any updates, or workarounds for this? @mattieruth - I'm also getting the error. Thanks!

Happening with Vite/Vue.

Occurs here:

          callFrame.value = DailyIframe.createFrame(videoContainer.value as HTMLElement, {
            showLeaveButton: true,
            iframeStyle: {
              width: '100%',
              height: '600px',
              border: '0',
            },
          });