Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello,
So I'm having an issue where I can get a report embedded, and (as shown in the image) I can perform a getPages() on the report and it returns the explected results of enumerating the pages from the report. So then I pull out a particular page using the page(<pageName>) function and assign it to a variable, the problem comes in when I try to use page.getFilters() for some reason the promise is being broken, and so I am unable to get the filters that are on the page. I never had any trouble with this previously so I'm not sure what changed, but I'd really wish it would go back to just working.
I'm also having the same issue in my application. I noticed Power Bi was reporting a fault on Friday about filtering if you were using custom visuals. I've created a new report, with no custom visuals and just one graph and I'm getting the same issue when filtering:
reportEmbed.min.js:1 Unhandled Promise rejection: Failed to execute 'postMessage' on 'Window': TypeError: Cannot read property 'instanceOfIVisualLevel' of undefined could not be cloned. ; Zone: <root> ; Task: Promise.then ; Value: DOMException: Failed to execute 'postMessage' on 'Window': TypeError: Cannot read property 'instanceOfIVisualLevel' of undefined could not be cloned. at e.sendResponse (https://app.powerbi.com/13.0.6617.130/externals/windowPostMessageProxy.min.js:2:3035) at https://app.powerbi.com/13.0.6617.130/externals/windowPostMessageProxy.min.js:2:4753 at t.invoke (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:449376) at e.run (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:444540) at https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:455835 at t.invokeTask (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:450060) at e.runTask (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:445234) at v (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:452421) at e.invokeTask (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:451223) at i.isUsingGlobalCallback.invoke (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:451082) Error: Failed to execute 'postMessage' on 'Window': TypeError: Cannot read property 'instanceOfIVisualLevel' of undefined could not be cloned. at e.sendResponse (https://app.powerbi.com/13.0.6617.130/externals/windowPostMessageProxy.min.js:2:3035) at https://app.powerbi.com/13.0.6617.130/externals/windowPostMessageProxy.min.js:2:4753 at t.invoke (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:449376) at e.run (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:444540) at https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:455835 at t.invokeTask (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:450060) at e.runTask (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:445234) at v (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:452421) at e.invokeTask (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:451223) at i.isUsingGlobalCallback.invoke (https://app.powerbi.com/13.0.6617.130/scripts/reportEmbed.min.js:1:451082)
I have logged a support case with microsoft. They are looking into a fix but they have the following work around:
Customers may receive an error while setting or getting page-level filters or visual-level filters using the Power BI embedded javascript API. As a workaround, customers can pass in any filter object in load config. Engineers are investigating the issue. Next update @ 9/10/18 at 9:00AM PDT.
@Rich2852 wrote:I have logged a support case with microsoft. They are looking into a fix but they have the following work around:
@Rich2852 if I could give you +100 Kudos, I would! You are a legend! Let's hope the Power BI team comes out with a fix sooner rather than later, and hopefully some regression testing to ensure this doesn't happen again!
For everyone interested, I'm assuming that the issue causing this forum thread is related to the last Awareness item listed on this page https://powerbi.microsoft.com/en-us/support/
So I'm not sure there's going to be any resolution before then.
Thanks for spotting that @Anonymous ! I'm pretty certain that I'm not using custom visuals at all... but might be the best hope for a resolution at the moment.
This is still a problem.
This is an interesting Stack Overflow discussion...
Specifically about Google Tag Manager, but a similar error, and alot of people reporting this RECENTLY.
Another SO post...
Suggests the issue is with attempting to set a page filter BEFORE a report filter - and says that this can be reproduced on Microsoft's own hosted samples!
Also consider: https://stackoverflow.com/questions/52122011/failed-to-execute-postmessage-on-window-googletagmanage...
I'm still running into issues with this, but I've been able to find a workaround, once the user interacts with the page and applies a filter, then the getFilters() function started returning working promises again.
YES! I am also having a similar problem!!! However my issue is with a call to setFilters(). It was previously working fine but something appears to now be broken, without any change being applied by us.
Failed to execute 'postMessage' on 'Window': TypeError: cannot read property 'instanceOfIVisualLevel' of undefined could not be cloned."
If any Power BI MS devs are reading this... please investigate ASAP!
I have updated our code to the latest version of the Power BI Javascript API, but still appears to be broken.
I can confirm that in my case;
1. page.setFilters() and visual.setFilters() are the methods that I am calling first.
2. These all fail with the errors identified above by the OP.
3. If the user interacts with the report (i.e. does some clicking), and then interacts with our HTML controls that are outside the Power BI Embedded iframe (i.e. and call the Power BI Javascript API in response to the updates) then the next calls to page.setFilters(), visual.setFilters() work successfully.
MS Power BI team, PLS HALP!
Can someone look into this, because it really does feel like something has broken in the back-end that has caused our app to break without any other changes having been made.
I'm having the same problem. When calling page.getFilters() and page.setFilters()..
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
16 | |
2 | |
1 | |
1 | |
1 |