elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.63k stars 8.23k forks source link

[Index Patterns] Logs contain `Cannot read property 'payload' of undefined` #103496

Closed wylieconlon closed 3 years ago

wylieconlon commented 3 years ago

I just started Kibana locally and I'm seeing many log messages containing this text:

server    log   [10:52:52.734] [error][data][data][indexPatterns][plugins] TypeError: Cannot read property 'payload' of undefined
    at /Users/wylie/dev/kibana/src/plugins/data/server/index_patterns/index_patterns_api_client.ts:40:22
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at IndexPatternsApiServer.getFieldsForWildcard (/Users/wylie/dev/kibana/src/plugins/data/server/index_patterns/index_patterns_api_client.ts:31:12)
    at IndexPatternsService.refreshFieldSpecMap (/Users/wylie/dev/kibana/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts:301:26)
    at IndexPatternsService.initFromSavedObject (/Users/wylie/dev/kibana/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts:419:21)
elasticmachine commented 3 years ago

Pinging @elastic/kibana-app-services (Team:AppServices)

mattkime commented 3 years ago

@wylieconlon I just attempted to reproduce this with the latest on master but I'm not seeing it. Do you still see it?

If you do, log just before the error to see what kind of err object is being passed. Seems like our assumptions of that thing might not be accurate.

wylieconlon commented 3 years ago

Yes, I am still seeing it on the latest master.

On Mon, Jun 28, 2021 at 7:46 PM Matthew Kime @.***> wrote:

@wylieconlon https://github.com/wylieconlon I just attempted to reproduce this with the latest on master but I'm not seeing it. Do you still see it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/elastic/kibana/issues/103496#issuecomment-870120667, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFCW26KDV5WY6V5NZF3SJLTVECVXANCNFSM47OEV4WQ .

mattkime commented 3 years ago

This happens when rollup indices are present. Its because telemetry is being collected on index patterns with the kibana_system user. While the kibana_system user has access uses view_index_metadata to get the field list of normal indices, it currently needs read access for rollup indices - https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-get-rollup-index-caps.html

mattkime commented 3 years ago

resolved via https://github.com/elastic/elasticsearch/issues/74779