I am trying to build an application which supports mobile as well as the desktop view of Power BI report. As per my understanding from article Embed a report in mobile layout, by default, report should be in landscape mode. Following the given guidelines, I am able to switch between mobile portrait view and mobile Landscape view in power bi embedded. However, during testing, I noticed that the reports in my application don't have defined mobile layout will throw an error. If Iayouttype in config setting value is 0 or 1 (master or custom), then all my reports will display an output in landscape mode even in mobile view without throwing any error. In another case, if I use layout type value is 2 or 3 (portrait or landscape mode) then mobile layout portrait and landscape features are preserved but throw an error for other reports which are not configured for mobile layout.
I am using powerbi.js version 2.6 .
Sample piece of code -
Error - when layout type is MobilePotrait or landscape but other reports are not optimise for mobile.