microsoft / powerbi-client-angular

Power BI Angular component. This library lets you embed Power BI report, dashboard, dashboard tile, report visual, or Q&A in your Angular application.
Other
135 stars 65 forks source link

TypeError: Cannot read properties of null (reading 'postMessage') #41

Closed lionelgaillard closed 1 week ago

lionelgaillard commented 1 year ago

Hello,

This error occurs if we destroy the <powerbi-report /> approximately 1.5s after it was created.

Scenario

A page "A" containing a <powerbi-report /> component, and another another page "B" without the componenet. (It would probably also happen by toggling the component with ngIf)

Steps

Expected

The component should be properly destroyed.

Actual

TypeError: Cannot read properties of null (reading 'postMessage')

Comment

The ngx-powerbi library seems to have the same issue: https://github.com/ramandeep-singh-1983/ngx-powerbi/issues/48

yurka1605 commented 1 year ago

This was recently fixed in the beta version 2.22.4 of the package https://www.npmjs.com/package/powerbi-client/v/2.22.4 I hope they fix it here

lionelgaillard commented 10 months ago

Hello,

I just updated powerbi-client-angular to version 3.0.5 and powerbi-client to version 2.22.4, but the problem still exists.

v-MadhavC commented 2 months ago

Thank you for reporting this issue. This is an old issue, is it still relevant?

v-MadhavC commented 2 months ago

We are waiting for your response. If no response is received within the next couple of weeks, the issue will be closed.

v-MadhavC commented 3 weeks ago

This issue has been fixed in the window-post-message-proxy. Please install the latest powerbi-client package: powerbi-client (v2.23.1)