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

Search Profiler: Cannot read properties of undefined (reading 'shards') - error pops up when you click on profile button #127514

Closed
rashmivkulkarni opened this issue Mar 10, 2022 · 7 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Search Profiler Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@rashmivkulkarni
Copy link
Contributor

Kibana : main

Search profiler: When trying to unskip the search profiler accessibility test , I ran into this issue.

Steps: Navigate to Dev Tools> Search Profiler and click on Profile button. Immediately a pop up appears with this error message .

Cannot read properties of undefined (reading 'shards')

Expanding it

TypeError: Cannot read properties of undefined (reading 'shards')
    at http://localhost:5620/9007199254740991/bundles/plugin/searchprofiler/8.0.0/searchprofiler.chunk.0.js:5127:33
    at async handleProfileClick (http://localhost:5620/9007199254740991/bundles/plugin/searchprofiler/8.0.0/searchprofiler.chunk.0.js:3699:11

This was after pulling main into my branch and bootstrapping.

Test in question: x-pack/test/accessibility/apps/search_profiler.ts
Start your test server: node scripts/functional_tests_server --config test/accessibility/config.ts
Run the test node scripts/functional_test_runner --config test/accessibility/config.ts

Screen Shot 2022-03-10 at 11 46 22 AM

Screen Shot 2022-03-10 at 12 31 34 PM

Ref issue: #91939

cc @alisonelizabeth @LeeDr

@rashmivkulkarni rashmivkulkarni added bug Fixes for quality problems that affect the customer experience Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Search Profiler labels Mar 10, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@alisonelizabeth
Copy link
Contributor

Took a quick look at this.

The UI is expecting profile.shards to exist in the data returned, however, it is not here.

It looks like this is potentially an ES issue, although the UI should handle this more gracefully. @rashmivkulkarni do you know if the accessibility tests are run with a certain kind of a user? I wonder if this is a permissions issue or something.

@rashmivkulkarni
Copy link
Contributor Author

accessibility tests - use test_user which is basically a superuser.

@alisonelizabeth
Copy link
Contributor

accessibility tests - use test_user which is basically a superuser.

@rashmivkulkarni Can you point me to where that's defined in the tests?

Just to rule it out, I think it's worth trying to run as a superuser to see if it's a permissions issue or not, as I'm not able to reproduce the issue when I run Search Profiler locally as a elastic user.

@yuliacech
Copy link
Contributor

@alisonelizabeth @rashmivkulkarni I remembered the same issue tracked here. My thoughts on the issue were:

I think that we need to investigate why the option profile: true is not working when sending the request to ES here.

Hope that might be helpful

@alisonelizabeth
Copy link
Contributor

Thanks for sharing @yuliacech! I didn't realize there was another issue open.

@rashmivkulkarni I'm going to close your issue in favor of Yulia's: #125080.

Let's continue the discussion there. I'll reach out to the ES team to see if they have any thoughts.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

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:Search Profiler Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

4 participants