OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[BUG] Unable to use shared links when Store URLs in session storage is enabled
Describe the bug The share links feature does not work when using the store URLs in session storage setting is enabled. This used to work with Kibana 7.x
Creating the shared link to a search appears to work, but when opening the link an error will be presented and the default discovery view will load instead, without any of the parameters that were supposed to be shared.
To Reproduce Steps to reproduce the behavior:
- Go to Dashboads management -> Advanced settings
- Enable Store URLs in session storage
- Go to the discover view and search for something.
Expected behavior Shared links should be saved with this feature enabled.
OpenSearch Version 2.11.0
Dashboards Version 2.11.0
Plugins
N/A
Stack trace
throwUnableToRestoreUrlError@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:116617
retrieveState@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:116887
decodeState@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:117980
getStatesFromOsdUrl/<@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:121054
getStatesFromOsdUrl@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:121008
getStateFromOsdUrl@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:121217
get@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/opensearchDashboardsUtils/opensearchDashboardsUtils.plugin.js:1:128300
connectStorageToQueryState@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/data/data.plugin.js:1:109931
TopNav@https://opensearch.infra.euw1.i.example.com/6665/bundles/plugin/discover/discover.chunk.4.js:1:42837
$i@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:57931
gs@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:104170
uc@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:96720
sc@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:96643
Qs@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:93673
Vo/<@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:45315
__osdSharedDeps__</t.unstable_runWithPriority@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:443:3844
Xo@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:45024
Vo@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:435:45262
B@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:443:2784
__osdSharedDeps__</y.port1.onmessage@https://opensearch.infra.euw1.i.example.com/6665/bundles/osd-ui-shared-deps/osd-ui-shared-deps.js:443:1540
Host/Environment (please complete the following information):
- OS: macOS 14.1
- Browser and version: Chrome 120.0.6099.62
Additional context
Workaround for now is to disable Store URLs in session storage
@albgus , I attempted to replicate the issue but was unsuccessful. Could you please include screenshots for better clarity?
Was able to reproduce this issue, and this bug still exists in 2.12.
https://github.com/opensearch-project/OpenSearch-Dashboards/assets/43937633/bfc2f220-3184-4750-aa5c-0f0a3162c070
This solves the issue. It seems like AWS OSS enables this by default for some reason.
Issue still persists in 2.15
The URL can sometimes grow to be too large for some browsers to handle. To counter-act this we are testing if storing parts of the URL in session storage could help. Please let us know how it goes!
Assuming that this is a place to "let us know how it goes" I can confirm that with a fairly robust instance group on AWS, we fell victim to this setting as well, and it's not working as desired, as far as we can tell. It may be related to user perms on who is initiating the action, but we aren't well enough versed in the code internals to know for sure
Changing that setting to false did resolve our issue.
@ssantichaivekin @jcolebrand Is this setting on by default for you? As you can see in my screenshot below from 2.13 (also verified this in 2.15 and main, we never changed the default behaviour here. And if the user did change the setting, the default value for the field would still be visible. Can you provide an additional information you have about this issue? Do you see a default value as shown here?