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

[Uptime] While running functional tests, undefined exception #63686

Closed
shahzad31 opened this issue Apr 16, 2020 · 2 comments · Fixed by #65115
Closed

[Uptime] While running functional tests, undefined exception #63686

shahzad31 opened this issue Apr 16, 2020 · 2 comments · Fixed by #65115
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability

Comments

@shahzad31
Copy link
Contributor

While running uptime functional tests, sometimes this exception get's throwned.

image


   │ proc [kibana] TypeError: Cannot read property 'monitors' of undefined
   │ proc [kibana]     at findPotentialMatches (/Users/shahzad/elastic/kibana/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts:50:43)
   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
   │ proc [kibana] server    log   [13:12:38.338] [error][http] TypeError: Cannot read property 'counts' of undefined
   │ proc [kibana]     at statusCount (/Users/shahzad/elastic/kibana/x-pack/plugins/uptime/server/lib/requests/get_snapshot_counts.ts:58:27)
   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
   │ proc [kibana] server   error  [13:12:38.166]  Error: Internal Server Error
   │ proc [kibana]     at HapiResponseAdapter.toInternalError (/Users/shahzad/elastic/kibana/src/core/server/http/router/response_adapter.ts:56:19)
   │ proc [kibana]     at Router.handle (/Users/shahzad/elastic/kibana/src/core/server/http/router/router.ts:268:34)
   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:68:7)
@shahzad31 shahzad31 added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Apr 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@justinkambic
Copy link
Contributor

I have seen this as well. I think it's not really a product of the tests having a problem, but more of the server not handling undefined keys on result objects.

The solution for the thrown exception is probably to make the server code more resilient, and just return an empty set.

The actual cause of the empty set is (I think) that the index pattern the app is trying to use does not exist. We should investigate by logging the parameters the server is sending to Elasticsearch just before the exception is thrown to make sure of this, and return a nice message like "Uptime index pattern does not exist".

@andrewvc andrewvc added [zube]: Inbox bug Fixes for quality problems that affect the customer experience and removed [zube]: Inbox labels Apr 22, 2020
@shahzad31 shahzad31 self-assigned this May 4, 2020
@zube zube bot unassigned shahzad31 May 4, 2020
@shahzad31 shahzad31 self-assigned this May 4, 2020
@zube zube bot removed the [zube]: Done label May 26, 2020
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 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants