superset icon indicating copy to clipboard operation
superset copied to clipboard

Embed: Unexpected error / This session has encountered an interruption

Open dschleef opened this issue 2 years ago • 3 comments

A user of an embedded dashboard reports occasional periods of time when all panels in the dashboard have the error "This session has encountered an interruption, and some controls may not work as intended. If you are the developer of this app, please check that the guest token is being generated correctly". This indicates that the embed token refresh is sometimes not happening correctly for this user, although it is happening correctly for other users.

See attached proposed fix. I'm not 100% the actual bug experienced by the user is fixed -- since the problem is intermittent, it might take a few weeks.

How to reproduce the bug

  1. Adjust the clock on your computer to be 5 minutes behind.
  2. Go to an embedded superset dashboard.
  3. Wait 5 minutes for the guest token to expire.
  4. Do any action that causes a panel to be loaded.
  5. See error

Expected results

No error, the embed token had been refreshed after 5 minutes.

Actual results

Errors, because the embed token was not refreshed at 5 minutes and expired.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

(please complete the following information):

  • browser type and version: Chrome 115
  • superset version: 3.0rc2
  • python version: 3.10
  • node.js version: TBD
  • any feature flags active:

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • [ X ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [ X ] I have reproduced the issue with at least the latest released version of superset. (Close enough -- there aren't any relevant changes since rc2.)
  • [ X ] I have checked the issue tracker for the same issue and I haven't found one similar. (This issue might be related: https://github.com/apache/superset/issues/24765 )

Additional context

Add any other context about the problem here.

dschleef avatar Aug 31 '23 19:08 dschleef

Proposed fix: https://gist.github.com/dschleef/cf2a02b9b95456e420fa600b7349b938

dschleef avatar Aug 31 '23 19:08 dschleef

Could someone take a look at this? Thanks.

dschleef avatar Oct 27 '23 18:10 dschleef

@dschleef are you still facing this issue? If you have a proposed fix, I would suggest opening a pull request with the code change. I'm guessing by the lack of other people reporting the issue that it's a bit of an edge case. Is it still happening in Superset 3.1.x? This might be closed as stale if we can't find anyone to work on it or help validate it.

rusackas avatar Apr 04 '24 01:04 rusackas