Skip to content
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

Kibana doesn't handle the error if user tries to create a aggregation based viz out of a faulty saved search (missing dataview) #147285

Closed
bhavyarm opened this issue Dec 8, 2022 · 1 comment · Fixed by #147327
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Dec 8, 2022

Kibana version: 8.6.0 BC6

Elasticsearch version: 8.6.0 BC6

Server OS version: darwin_x86_64

Browser version: chrome latest

Browser OS version: OS X

Original install method (e.g. download page, yum, from source, etc.): from staging

Describe the bug: If user picks a faulty saved search (missing dataview) and tries to create an aggregation based viz out of it - Kibana errors out with Error: Cannot read properties of undefined (reading 'aggs') on the page without any grace.
Screen Shot 2022-12-08 at 2 25 13 PM

Steps to reproduce:

  1. create a saved search
  2. Delete the dataview associated with it
  3. Go to dashboard or visualize library and try to create an agg based viz with the saved search from step 1
  4. Kibana errors out

Console error:

kbn-ui-shared-deps-npm.dll.js:398 TypeError: Cannot read properties of undefined (reading 'getName')
    at A (visDefaultEditor.chunk.1.js:1:70346)
    at ca (kbn-ui-shared-deps-npm.dll.js:398:59210)
    at Js (kbn-ui-shared-deps-npm.dll.js:398:115077)
    at Fu (kbn-ui-shared-deps-npm.dll.js:398:99860)
    at Pu (kbn-ui-shared-deps-npm.dll.js:398:99682)
    at Ru (kbn-ui-shared-deps-npm.dll.js:398:99515)
    at xu (kbn-ui-shared-deps-npm.dll.js:398:96348)
    at kbn-ui-shared-deps-npm.dll.js:398:45132
    at t.unstable_runWithPriority (kbn-ui-shared-deps-npm.dll.js:406:3768)
    at $i (kbn-ui-shared-deps-npm.dll.js:398:44909)
ms @ kbn-ui-shared-deps-npm.dll.js:398
2kbn-ui-shared-deps-npm.dll.js:398 TypeError: Cannot read properties of undefined (reading 'aggs')
    at visDefaultEditor.chunk.1.js:1:134564
    at Object.useMemo (kbn-ui-shared-deps-npm.dll.js:398:65133)
    at t.useMemo (kbn-ui-shared-deps-npm.dll.js:374:5744)
    at _t (visDefaultEditor.chunk.1.js:1:134546)
    at ca (kbn-ui-shared-deps-npm.dll.js:398:59210)
    at Js (kbn-ui-shared-deps-npm.dll.js:398:115077)
    at Fu (kbn-ui-shared-deps-npm.dll.js:398:99860)
    at Pu (kbn-ui-shared-deps-npm.dll.js:398:99682)
    at Ru (kbn-ui-shared-deps-npm.dll.js:398:99515)
@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Dec 8, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@stratoula stratoula self-assigned this Dec 12, 2022
@stratoula stratoula added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Dec 12, 2022
stratoula added a commit that referenced this issue Dec 12, 2022
…view (#147327)

## Summary

Closes #147285

It fixes the bug that is described in the issue. If you create a saved
search with an index pattern and then delete the index pattern. now it
won't break the entire kibana but will navigate to to the following
screen that indicates that there is no index.

<img width="1858" alt="image"
src="https://user-images.githubusercontent.com/17003240/206996776-aa595932-0670-4ecc-aaca-344642ec02cd.png">

This is an edge case on my point of view, ideally if there are saved
searches that correspond to a non-existent dataview should not be on the
list but the current architecture doesn't allow to quickly solve this. I
think it is fine for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants