Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I had working code that was succesfully calling the page.hasLayout function - to check to see if a report had a mobile layout.
As of yesterday (5th Oct 2019) - this code no longer works, and an odd Angular error appears in the browser console.
I have not changed my code at all.
Attempted to update JavaScript client version to latest 2.10.1 -> but issue still exists.
Sample Code:
report.getPages() .then((page: Array<pbi.Page>) => { page[0].hasLayout(models.LayoutType.MobilePortrait)....
GetPages works just fine, page array contains expected report pages.
Selecting first page (by 0 index) and calling hasLayout results in error.
Looking at Angular docs (I am not an Angular dev) - it looks like a possible missing dependency?
https://docs.angularjs.org/error/$injector/unpr
Could this be an issue with the scripts being served up from api.powerbi.com (as in the error screenshot) ?
Any help is very much appreciated.
Thanks,
Matt
Solved! Go to Solution.
@MattCalderwood , @Dan2 : I got word from support that the fix has been deployed. I have tested and it looks good.
Power BI team is working on the fix. It should be fixed in all production clusters by 10/23. As a mitigation you can remove the use of 'hasLayout' and embed with MobilePortrait/MobileLandscape. In this way, if the MobilePortrait does not exist the default layout will be rendered instead.
@MattCalderwood , @Dan2 : I got word from support that the fix has been deployed. I have tested and it looks good.
I've been told by support that a fix will be out in the second week of November.
Yikes - that feels like a long time to wait.. but thanks again for keep us all updated @Norm - really appreciate it.
Having the same issue as poster and everyone else. Any updates would be appreciated. Thanks.
We have the same problem as you. Everything was working perfectly and since the end of last week we have the same error. As you said, the problem must be with the api.powerbi.com scripts because even the sample tool ( https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html# ) have the same error on the Check Layout sample.
I would be great if the PowerBI Team could look this up!
Good to see it's not just me who is having the issue, well done @Norm for confirming it using the official sample tool code.
now just need confirmation (and fix) from the Power BI team.
@MattCalderwood I've opened a ticket and talked with someone from the support team. They are going to look into this.
Excellent - thanks for keeping me updated.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |