- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem using page.getFilters()
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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/
Customers using Power BI Embedded APIs to set report filters may experience error applying filters. This issue happens only if a report has Custom visuals. The fix will be deployed to production by end of day on 9/7. Next update @ 9/7/18 at 16:00 PDT.
So I'm not sure there's going to be any resolution before then.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is still a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm having the same problem. When calling page.getFilters() and page.setFilters()..
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
08-15-2024 10:13 AM | |||
07-01-2024 05:58 AM | |||
06-13-2024 12:42 PM | |||
10-23-2021 12:19 PM | |||
07-26-2024 10:21 AM |
User | Count |
---|---|
11 | |
1 | |
1 | |
1 | |
1 |