Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
We've been using the Phased Embedding API (https://github.com/Microsoft/PowerBI-JavaScript/wiki/Phased-Embedding-API) in order to pick the report page dynamically in the client for a few weeks now without issue. Today, it appears that the getPages() request is no longer returning a body, so we get the following error: `Uncaught (in promise) TypeError: Cannot read property 'map' of undefined` pointing us to the powerbi-client src:
e.prototype.getPages = function() { var t = this; return this.service.hpm.get("/report/pages", { uid: this.config.uniqueId }, this.iframe.contentWindow).then(function(e) { return e.body.map(function(e) { return new l.Page(t,e.name,e.displayName,e.isActive,e.visibility) }) }, function(t) { throw t.body }) }
The response we get `e` is defined as:
{"warning":"Handler for message: {\n \"method\": \"GET\",\n \"url\": \"/report/pages\",\n \"headers\": {\n \"x-sdk-type\": \"js\",\n \"x-sdk-version\": \"2.6.6\",\n \"uid\": \"z65rk\",\n \"id\": \"l0g7p\"\n },\n \"params\": {},\n \"queryParams\": {}\n} did not return a response message. The default response message will be returned instead.","headers":{"id":"l0g7p"}}
`e.body` is not defined, so `e.body.map` blows up.
Our implementation of the API has been working fine until today, and looks as follows:
var t = e.instance.load(e.wrapper, e.config); t.on("loaded", function() { t.getPages().then(function(n) { for (var a = 0; a < n.length; a += 1) if (n[a].displayName === e.report.pageName) { t.render({ pageName: n[a].name }); break } }) })
It appears that this might be an issue with the v2.6.6 embed API, but all status options we can see reflect PowerBI as operating normally. Any insights/help would be much appreciated.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
5 | |
4 | |
4 |