Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dvanlooy
New Member

Power BI Javascript postMessage issues (Failed to execute 'postMessage' on 'Window')

Hi, 

In the js library from https://github.com/microsoft/PowerBI-JavaScript we encounter a lot of errors caused bij postMessage functions. (Failed to execute 'postMessage' on 'Window': #<Object> could not be cloned.) This is mainly caused by the interactions of the embedded content with the embedding window (mostly an iFrame) simply putting stringify on the postMessage functions is a dirty work arround for the error but no guarantee the embedding still behaves as intended.

Could someone please assist?

3 REPLIES 3
Niels-m
New Member

@dvanlooy did you solve this?

Anonymous
Not applicable

Hi @dvanlooy ,

 

You seems to want to embed your Power BI Report by Javascript. Here I suggest you to make sure what kind of embedded methods you want: App owns data or User owns data.

For reference: 
Embed content in your Power BI embedded analytics application for your organization - Power BI | Mic...
Embed content in your Power BI embedded analytics application - Power BI | Microsoft Learn
You can refer to the sample GitHub - microsoft/PowerBI-Developer-Samples: A collection of Power BI samples for developer use. .

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Rico,

I am following this sample: https://learn.microsoft.com/en-us/power-bi/developer/embedded/embed-power-bi-salesforce and using 'app owns data'. This requires the powerbi javascript library to be used. Chrome browser (by far most used browser) is throwing this exception by this javascript library when used in combination with an iframe as documented.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.