-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard breaks on unrestorable session state in URL #71461
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
The same is reproduced when right clicking the |
Good catch @inqueue , it's using a very similar technique for state handling. I updated the description. |
cc @Dosant - one option would be to handle this error case within the state management helper from utils by just returning |
@flash1293, I agree this should be better handled inside the util, but I'd also prefer to not pass Anyway, because it isn't a plugin, but just a set of stateless functions, will have to pass something everywhere explicitly. So maybe make it more generic at allow to pass It also not only about try / catching initial I think we should put generic error handling improvements on app-arch roadmap, but if we want to fix this asap I think at least |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Fixes #71461 regression since 7.7 New state syncing utils didn't properly handle errors, Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see #71461) There are not much scenarios where missing proper error handling could really impact users, except the one described in #71461: Kibana users state:storeInSessionStorage Users often intuitively share hashed dashboard urls directly When someone opens those urls - there is a blank screen with warning In 7.6 - dashboard would still load with default state. Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users. This PR makes sure that behaviour is similar to one we had before 7.7. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes elastic#71461 regression since 7.7 New state syncing utils didn't properly handle errors, Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see elastic#71461) There are not much scenarios where missing proper error handling could really impact users, except the one described in elastic#71461: Kibana users state:storeInSessionStorage Users often intuitively share hashed dashboard urls directly When someone opens those urls - there is a blank screen with warning In 7.6 - dashboard would still load with default state. Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users. This PR makes sure that behaviour is similar to one we had before 7.7. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Fixes elastic#71461 regression since 7.7 New state syncing utils didn't properly handle errors, Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see elastic#71461) There are not much scenarios where missing proper error handling could really impact users, except the one described in elastic#71461: Kibana users state:storeInSessionStorage Users often intuitively share hashed dashboard urls directly When someone opens those urls - there is a blank screen with warning In 7.6 - dashboard would still load with default state. Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users. This PR makes sure that behaviour is similar to one we had before 7.7. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # src/plugins/timelion/public/app.js # x-pack/plugins/lens/public/app_plugin/app.tsx
Fixes #71461 regression since 7.7 New state syncing utils didn't properly handle errors, Errors happening during URL parsing or writing wasn't handled, so state syncing could stop or in worth case blow out. (see #71461) There are not much scenarios where missing proper error handling could really impact users, except the one described in #71461: Kibana users state:storeInSessionStorage Users often intuitively share hashed dashboard urls directly When someone opens those urls - there is a blank screen with warning In 7.6 - dashboard would still load with default state. Since 7.7 these still could be achieved by removing query params for URL, but it is not obvious for regular users. This PR makes sure that behaviour is similar to one we had before 7.7. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Kibana version: >= 7.7
Describe the bug: When accessing a dashboard URL having
state:storeInSessionStorage
enabled, dashboard fails to render if the state hashes in the URL can't be resolved.Steps to reproduce:
state:storeInSessionStorage
Expected behavior:
The dashboard should render based on the saved object state and a toast should be shown informing the user the URL state could not the restored.
Any additional context:
Stack trace:
This is the line throwing the error:https://github.com/flash1293/kibana/blob/bf04235dae35452061cc7ea3d86d96c19a58206c/src/plugins/dashboard/public/application/dashboard_state_manager.ts#L132
It should be guarded with a try/catch block - if the URL state can't be restored, it should just continue the initialization routine based on the state it already got from the saved object.
As Visualize and Discover are using very similar state handling mechanisms, they are most likely affected by this as well and should be fixed the same way.
The text was updated successfully, but these errors were encountered: