cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ThomasDay Member
Member

embedded-expiration/timeout issue?

Hello fellow Embedders,

 

I have a site that is working great...until it sits for 3 minutes or perhaps 5.  Then I get this when I click another tab in the report.Capture.PNG

The token expiration is set for 1 hr, btw, so I'm not sure what's up.  A refresh sets things straight.  What's to be done here..any ideas?

Thanks,

Tom

18 REPLIES 18
wabreza Regular Visitor
Regular Visitor

Re: embedded-expiration/timeout issue?

If you click on one of the "See Details" links do you get an activity or request id GUID?  If so please share.  I'll be able to look up the root cause of the issue with this information.

wabreza Regular Visitor
Regular Visitor

Re: embedded-expiration/timeout issue?

If this does come down to being a timeout issue you can try one of the following:

 

  • In a server generated app you can get around this by generating a token for each render of the page.
  • In a single page app (SPA) - one option is to set a client-side timer on your page/view that is shorter than your token expiration.  At that point you can regenerate the token and reload the report passing in the new access token.
ThomasDay Member
Member

Re: embedded-expiration/timeout issue?

@wabreza Here are the tech details of the error.  Let me know what you see as a root cause.....and thanks, Tom

 

Capture.PNG

wabreza Regular Visitor
Regular Visitor

Re: embedded-expiration/timeout issue?

Its a 403 which is an access issue.  What is the expiration of your generated tokens?  Is the expiration you are setting inline which the timeout you are seeing in the embedded report?

ThomasDay Member
Member

Re: embedded-expiration/timeout issue?

@wabreza No the token timeout is set to 1hr.  We've had 403's forever to be honest.  They happen when the site has been sitting and I click on another tab in a report.  Time is 3-7 minutes, but not always.  Sometimes longer...but seldom a non-issue.  We have 4 embedded reports up behind our paywall.  The tabbed ones are the main issue.  There are lots of filters and data...and the app is really useful and fast.  Very good market reception.  Can't say I recall a non-tabbed one giving me trouble but I'll look more carefully going forward.  Now that we're live and have users starting up...we're paying more attention in general.  Tom

wabreza Regular Visitor
Regular Visitor

Re: embedded-expiration/timeout issue?

You mentioned you have 4 embedded reports.  Are they all embedded within the app at the same time?  Or are they embedded seperatly in different views?

 

If they are all embedded in the page at the same time I'm thinking of some potential issues where their may be some shared state (cookies/local storage) that have the potential to be shared accross the iframes.

ThomasDay Member
Member

Re: embedded-expiration/timeout issue?

@wabrezaThey all are called via the same iFrame.  We have a wordpress site where the page behind our paywall has a side menu navbar where you pick the report--and it's retrieved via it's id from the collection/workspace.  There is seldom an issue as it's retrieved...just when it's been sitting and I click a report page tab or sometimes just click a slicer on the idle page and sometimes there are no problems.  

 

  • This morning's picture of problems had a single chrome tab open to our site iframe and the x's appeared when I clicked a powerbi report tab to switch pages.
  • The picture I sent to this topic, had two chrome tabs open to our site--and the second chrome tab iframe presented problems when I clicked a powerbi report tab to switch pages.
  • BTW, the first chrome tab iframe has not shown problems at all and has been sitting for quite some time. 

Is there something I can do to understand any shared state issues?

Tom

wabreza Regular Visitor
Regular Visitor

Re: embedded-expiration/timeout issue?

OK - So to be clear your app is re-using the same iframe to load multiple reports.  Correct?

 

How are you loading the reports?  Are you manually making the postMessage(...) calls or are you using the JavaScript SDK?  

ThomasDay Member
Member

Re: embedded-expiration/timeout issue?

@wabreza  I just called the embed site guy (I'm the powerbi guy) and he says "every time a new menu item is called, I load a new page and a new token."  So, I don't think that's the same iFrame in this sense.  

And using the JavaScript SDK...

Thanks for patience on this...