OpenSearch-Dashboards: [BUG] Navigation between dashboards requires browser refresh after update to 2.9.0

Describe the bug

When navigating between dashboards, dashboard contents do not load on initial request (accompanied by Javascript errors). Refresh button in OSD UI does not help, only browser refresh.

To Reproduce Steps to reproduce the behavior:

  1. Create two dashboards with a data table visualization
  2. Open web console in browser
  3. Open one dashboard
  4. Navigate to the second dashboard directly, which can be done by entering the URL in the browser (which mimics a hyper link between the dashboards)
  5. See error in web console
Detected an unhandled Promise rejection.
Error: Embeddable has been destroyed

embeddable.plugin.js:6 Uncaught (in promise) Error: Embeddable has been destroyed
    at VisualizeEmbeddable.render (embeddable.plugin.js:6:122906)
    at VisualizeEmbeddable._callee7$ (visualizations.plugin.js:6:193751)
    at tryCatch (queryWorkbenchDashboards.plugin.js:2:2179)
    at Generator._invoke (queryWorkbenchDashboards.plugin.js:2:1802)
    at Generator.next (queryWorkbenchDashboards.plugin.js:2:2954)
    at visualize_embeddable_asyncGeneratorStep (visualizations.plugin.js:6:176426)
    at _next (visualizations.plugin.js:6:176757)
    at visualizations.plugin.js:6:176949
    at new Promise (<anonymous>)
    at VisualizeEmbeddable.<anonymous> (visualizations.plugin.js:6:176669)
  1. Do a browser refresh --> Dashboard contents load, Javascript error disappears

Expected behavior Dashboard should load on first attempt. Should not require a reload in the browser

OpenSearch Version 2.9.0

Dashboards Version 2.9.0

Plugins

Default

Screenshots image

Host/Environment (please complete the following information):

  • Chrome, Firefox

Additional context

Update from 2.8.0 to 2.9.0. Function at 2.8.0 was okay.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

It seems to still be broken for me with 2.10.0.

The issue might be fixed by: https://github.com/opensearch-project/alerting-dashboards-plugin/pull/682 2.10.0 includes the fix alerting-dashboards-plugin/compare/2.9.0.0…2.10.0.0

Will provide update once tested. Providing this update that others can start to try as well.

By testing different ways of putting the link, I managed to make it work by putting http, that is, without the s in https. I had the problem with AWS OpenSearch 2.11. I hope that it would be useful to someone. Greetings

Hi @abbyhu2000, perfect. Planning to start working on this issue maybe next week. Currently in parallel with other issues that hope I have finished this week.

Hi @BigSamu, i just had a PR out for fixing this bug. Thank you for your participation on this issue!

Thanks @juergen-walter! This help recreated it.

Part of the deangularization of the dashboards plugin for security reasons attempted to keep intact certain sections of the code to avoid changes. Previously, no matter what the route would hard refresh there was a wrapper around the angular part of the application.

Unfortunately, that means the re-rendering from one state of dashboards through the URL causes the current app Id to immediately change in the url which is what we are keying off to determine when to set the current dashboard app state. The error being thrown is expected as async processes are trying to modify a component that has been destroyed already but it would have likely not haven gotten here if the dashboard id in the url wasn’t updated already.

Still looking into best next action.

I am seeing this as well.