Forum Discussion
PowerBI Embedded report stuck on loading sometimes
Hi all, I'm trying embed report on my Website. But sometimes iframe stucks on loading sometimes is working.
Below is my config :
var configR_desktop = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: TokenReport,
embedUrl: UrlReport,
id: embedReportdId,
pageName: 'ReportSection',
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false,
localeSettings: {
language: "en"
},
background: models.BackgroundType.Transparent
}
};And I need to refresh the website until embedded report working,
Everybody knows What's wrong with that? I would appreciate.:)
I fixed this problem. It's async problem.
In this case, Web got token from the server using socket.io. But sometimes Web cannot get Token immediately to set config because of a slow network. :smileyhappy:
5 Replies
- v-jiascu-msftMicrosoft Employee
Hi bboy81905,
1. If it's possible the token expires, how did you get token?
2. Were there any error messages in the browser console?
Your config looks good.
Best Regards,
Dale
- bboy81905Frequent Visitor
Thank for your reply v-jiascu-msft
- First, I think it's impossible the token expires. Because website will get token when the server starting, the server will use Power BI REST APIs to generate Token. In this case, the iframe of an embedded report will present the correct report but sometimes will keep loading. And then I refresh website, the report shows up again, but sometimes also stuck on loading. It's very wired.
- Second, the iframe of an embedded report stuck on loading, there is no error in the browser console!!
- bboy81905Frequent Visitor
I fixed this problem. It's async problem.
In this case, Web got token from the server using socket.io. But sometimes Web cannot get Token immediately to set config because of a slow network. :smileyhappy: