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:
- Create two dashboards with a data table visualization
- Open web console in browser
- Open one dashboard
- 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)
- 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)
- 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
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
- revert from OpenSearch/OpenSearch Dashboards v2.9.0 to v2.8.0, as the bug reported in opensearch-project/OpenSearch-Dashboards#4694 is a dealbreaker — committed to mmguero-dev/Malcolm by mmguero a year ago
- update opensearch to v2.10.0, but will immediately revert due to opensearch-project/OpenSearch-Dashboards#4694. checking in for tracking purposes only — committed to mmguero-dev/Malcolm by mmguero 9 months ago
- Revert "update opensearch to v2.10.0, but will immediately revert due to opensearch-project/OpenSearch-Dashboards#4694. checking in for tracking purposes only" This reverts commit 97852cad8d8f557f85f... — committed to mmguero-dev/Malcolm by mmguero 9 months ago
- Fix navigation bug from dashboard to dashboard (#5435) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <DashboardView... — committed to opensearch-project/OpenSearch-Dashboards by abbyhu2000 8 months ago
- Fix navigation bug from dashboard to dashboard (#5435) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <DashboardView... — committed to opensearch-project/OpenSearch-Dashboards by github-actions[bot] 8 months ago
- Fix navigation bug from dashboard to dashboard (#5435) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <DashboardView... — committed to opensearch-project/OpenSearch-Dashboards by github-actions[bot] 8 months ago
- Fix navigation bug from dashboard to dashboard (#5435) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <DashboardView... — committed to opensearch-project/OpenSearch-Dashboards by github-actions[bot] 8 months ago
- Fix navigation bug from dashboard to dashboard (#5435) (#5437) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <Dashb... — committed to opensearch-project/OpenSearch-Dashboards by opensearch-trigger-bot[bot] 8 months ago
- Fix navigation bug from dashboard to dashboard (#5435) (#5438) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <Dashb... — committed to opensearch-project/OpenSearch-Dashboards by opensearch-trigger-bot[bot] 8 months ago
- Fix navigation bug from dashboard to dashboard (#5435) Previously navigating from one dashboard to another dashboard do not work. This PR adds a dashboard id as a prop to pass into the <DashboardView... — committed to AMoo-Miki/OpenSearch-Dashboards by AMoo-Miki 8 months ago
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 @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.