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
When we embed a report to our React application, this API call inside the embedded report minified JavaScript (not in our code, the code shipped from Microsoft when using powerbi-client-react package) seems to take time and fail around half of the time:
POST call to https://wabi-north-europe-n-primary-redirect.analysis.windows.net/powerbi/refresh/subscribe
Half of the time it is okay, very quick to load the report. In that case we have observed that this powerbi/refresh/subscribe method does not seem to block in anyway, even though it is "pending" in the network tab of browser.
When it blocks, it is "pending" but never resolved or it starts the request again (usually fails).
In the minified code shipped from Microsoft to our application, in browser, we can see:
I believe this part of code is closed source, as I can't find it from Microsoft GitHub with search.
There are no token issues in our application, it might occure also when fetching a fresh new token to embed.
What is the call and what does it do? It is not documented in the Power BI documentations. This question has been asked at least twice in these forums, but no good answers given:
Should I open issue in either powerbi-client-react or PowerBI-JavaScript?
We are facing a similar issue and was wondering if your issue was resolved. If so, can you share the resolution?
Thanks
The error ended up being the following: in the frontend application we bootstrapped the embedding with powerbi-client-react with a variable which could be 'undefined' on some page loads, not always, so a racy condition in our end.
Since it could be 'undefined', Power BI embedded fallbacked to the default page of Power BI, which was an empty grey page in our report. When it did this, the call in console was blocked for whatever reason, probably because it stopped the initial bootstrap and went to the default page. Since the default page was the same color as our page background, we thought it stopped loading altogether.
Fix was to make it so that the variable could be not 'undefined', and it did not fallback to the default page. In your situation the default page is different, if I recall correctly it is the page you are on when you publish in Power BI.
Hi @jhirv08 ,
Based on your description, it seems you're encountering intermittent performance issues with the API call when embedding Power BI reports into a React application.
The call is likely related to subscribing the embedded report to receive updates when the underlying data or model is refreshed. This is crucial for ensuring that your embedded reports display the most current data without requiring a full reload of the report or page. The behavior you're observing—where the call sometimes blocks and fails—could be influenced by several factors, including network conditions, Power BI service load, or specific configurations of your embedded reports.
More details: Optimization guide for Power BI - Power BI | Microsoft Learn
Best practices for faster performance in Power BI embedded analytics - Power BI | Microsoft Learn
If it does not help, please provide more details.
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.