Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
bboy81905
Frequent Visitor

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.BI-loading.PNG

 

 

 

 

 

 BI-loading2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.:)  

1 ACCEPTED SOLUTION

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. Smiley Happy

View solution in original post

5 REPLIES 5
v-jiascu-msft
Employee
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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!!

 

 

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. Smiley Happy

That's great. Thanks for sharing.

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi - 

 

We're also trying to achieve the embed using JavaScript but somehow it is not working.

 

Can you please share your full JavaScript code with config? Didn't it require to generate a new token when it expires?

 

Much appreciated. 

 

Thank you

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.