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

[ES|QL] Console error about failing to parse search warnings #198258

Closed
jughosta opened this issue Oct 30, 2024 · 7 comments · Fixed by #198307
Closed

[ES|QL] Console error about failing to parse search warnings #198258

jughosta opened this issue Oct 30, 2024 · 7 comments · Fixed by #198307
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana

Comments

@jughosta
Copy link
Contributor

jughosta commented Oct 30, 2024

Kibana version: main

Describe the bug:
I can see an error in the Console when navigating to ES|QL in Discover:

reportUnhandledError.js:10 Uncaught TypeError: Cannot read properties of undefined (reading 'failed')
    at extractWarnings (extract_warnings.ts:15:1)
    at handleWarnings (handle_warnings.tsx:29:1)
    at search_service.ts:239:1
    at Array.forEach (<anonymous>)
    at Object.showWarnings (search_service.ts:233:1)
    at getSearchWarningMessages (utils.ts:281:1)
    at Embeddable.getSearchWarningMessages (embeddable.tsx:800:1)
    at embeddable.tsx:299:1
    at Object.next (use_expression_renderer.ts:114:1)
    at __kbnSharedDeps_npm__.../../node_modules/rxjs/dist/esm5/internal/Subscriber.js.ConsumerObserver.next (Subscriber.js:96:1)

This might mean that search warnings (like failed search on some shards) would not be surfaced to the user in UI.

Image

@jughosta jughosta added bug Fixes for quality problems that affect the customer experience Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana labels Oct 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@stratoula
Copy link
Contributor

@jughosta I cant replicate. Can you give more details? How are you navigating in ES|QL? With which datasource?

@Dosant
Copy link
Contributor

Dosant commented Oct 30, 2024

@stratoula, I also saw this error. In my case it was an empty deployment > dashboard > try ESQL > see error in console

Uncaught TypeError: Cannot read properties of undefined (reading 'failed')
    at extractWarnings (extract_warnings.ts:15:1)
    at handleWarnings (handle_warnings.tsx:29:1)
    at search_service.ts:239:1
    at Array.forEach (<anonymous>)
    at Object.showWarnings (search_service.ts:233:1)
    at getSearchWarningMessages (utils.ts:281:1)
    at Embeddable.getSearchWarningMessages (embeddable.tsx:800:1)
    at embeddable.tsx:299:1
    at Object.next (use_expression_renderer.ts:114:1)

@stratoula
Copy link
Contributor

@Dosant thanx, I can replicate it now 🙌

@stratoula stratoula added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Oct 30, 2024
@jughosta
Copy link
Contributor Author

For me it happens every time I open ES|QL in Discover. Also even after a page refresh.

@stratoula
Copy link
Contributor

This fails because in ES|QL we dont send _clusters or _shards or timed_out for regular indices. We need to check for the existence of the properties first.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 1, 2024
## Summary

Closes elastic#198258

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
(cherry picked from commit c319060)
nreese pushed a commit to nreese/kibana that referenced this issue Nov 1, 2024
## Summary

Closes elastic#198258

### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
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 impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:ESQL ES|QL related features in Kibana
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants