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

Passthrough field type triggers crash in index management #192125

Closed
gregkalapos opened this issue Sep 4, 2024 · 3 comments · Fixed by #193246
Closed

Passthrough field type triggers crash in index management #192125

gregkalapos opened this issue Sep 4, 2024 · 3 comments · Fixed by #193246
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@gregkalapos
Copy link
Contributor

Kibana version: 8.16.0-9f5437f6-SNAPSHOT

Elasticsearch version: 8.16.0

Server OS version: likely all, tested on macOS 14.6.1

Browser version: likely all, tested on Safari 17.6 (19618.3.11.11.5), and Chrome 128.0.6613.114

Browser OS version: likely all, tested on macOS 14.6.1

Original install method (e.g. download page, yum, from source, etc.): docker.elastic.co/kibana/kibana:8.16.0-9f5437f6-SNAPSHOT

Describe the bug:

Elasticsearch introduced the passthrough field type in elastic/elasticsearch#103648. We use that for OTel data.

If an index contains such a field, Kibana crashes when you want to see the mapping for such an index.

Steps to reproduce:

  1. Create an index with passthrough field and ingest sample data:
PUT _index_template/passthrough_template
{
  "index_patterns": ["passthrough*"],
  "template": {
    "mappings": {
      "properties": {
        "attributes": {
          "dynamic": true,
          "type": "passthrough",
          "priority": 30
        }
      }
    }
  }
}
PUT /passthrough-index/_doc/1
{
  "attributes": {
    "key1": "value1",
    "key2": "value2"
  }
}
  1. In Kibana go to Stack Management
  2. Click Index Management
  3. Select the index passthrough-index
  4. Click Mappings
  5. Then the error happens

Expected behavior:

No error

Screenshots (if relevant):

This is the overview page, this one works.

Image

But then when you click Mappings, the error happens:

Image

Errors in browser console (if relevant):

core.entry.js:16 TypeError: Cannot read properties of undefined (reading 'label')
    at indexManagement.chunk.0.js:3:558919
    at Array.map (<anonymous>)
    at indexManagement.chunk.0.js:3:558881
    at Object.useMemo (kbn-ui-shared-deps-npm.dll.js:425:65135)
    at kbn-ui-shared-deps-npm.dll.js:401:5744
    at r (indexManagement.chunk.0.js:3:558834)
    at V (indexManagement.chunk.0.js:3:600985)
    at la (kbn-ui-shared-deps-npm.dll.js:425:59212)
    at ec (kbn-ui-shared-deps-npm.dll.js:425:114853)
    at Pc (kbn-ui-shared-deps-npm.dll.js:425:99736)
Pt @ core.entry.js:16
console.error @ core.entry.js:16
ms @ kbn-ui-shared-deps-npm.dll.js:425
Ms.i.componentDidCatch.n.callback @ kbn-ui-shared-deps-npm.dll.js:425
gi @ kbn-ui-shared-deps-npm.dll.js:425
As @ kbn-ui-shared-deps-npm.dll.js:425
Fc @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:433
Xo @ kbn-ui-shared-deps-npm.dll.js:425
Bc @ kbn-ui-shared-deps-npm.dll.js:425
wc @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:433
Xo @ kbn-ui-shared-deps-npm.dll.js:425
Qo @ kbn-ui-shared-deps-npm.dll.js:425
Zo @ kbn-ui-shared-deps-npm.dll.js:425
zc @ kbn-ui-shared-deps-npm.dll.js:425
La @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ esUiShared.plugin.js:1
await in (anonymous)
(anonymous) @ esUiShared.plugin.js:1
$c @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:433
Xo @ kbn-ui-shared-deps-npm.dll.js:425
Uc @ kbn-ui-shared-deps-npm.dll.js:425
wc @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:425
(anonymous) @ kbn-ui-shared-deps-npm.dll.js:433
Xo @ kbn-ui-shared-deps-npm.dll.js:425
Qo @ kbn-ui-shared-deps-npm.dll.js:425
Zo @ kbn-ui-shared-deps-npm.dll.js:425
ke @ kbn-ui-shared-deps-npm.dll.js:425
Zt @ kbn-ui-shared-deps-npm.dll.js:425

Provide logs and/or server output (if relevant):

null


V@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:598651
U@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:608441
Gn@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:403171
div
@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:356:45694
Kn@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:405272
Xn@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:408441
t@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:351:116116
E@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:208212
t@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:351:118282
T@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:208964
ws@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:465196
t@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:351:116116
E@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:208212
t@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:351:118282
T@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:208964
il
T@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:28:5408
ne@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:28:11241
te@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:28:10633
K@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:590:12660
t@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:351:112443
x@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:207986
al@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:493521
Q@http://localhost:5601/4180aa496766/bundles/plugin/esUiShared/1.0.0/esUiShared.plugin.js:1:35485
c@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:175547
l@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:199322
p@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:174328
v@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:546103
l@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:24478
@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:372:230814
Provider@http://localhost:5601/4180aa496766/bundles/plugin/kibanaReact/1.0.0/kibanaReact.plugin.js:1:25356
x@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js:43:314465
L@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js:43:315261
p@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js:43:310201
c@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:361:187289
IntlProvider@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js:43:224357
ee@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js:43:224869
Context@http://localhost:5601/4180aa496766/bundles/core/core.entry.js:16:207455
d@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:361:149841
p@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:361:387913
v@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:356:46148
a@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:384:11592
f@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:6:59342
C@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:361:617264
s@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:372:203783
a@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:361:963603
h@http://localhost:5601/4180aa496766/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:377:1073387
x@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.plugin.js:2:18447
v@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.plugin.js:2:18692
R@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.plugin.js:2:19172
fl@http://localhost:5601/4180aa496766/bundles/plugin/indexManagement/1.0.0/indexManagement.chunk.0.js:3:497638

Any additional context:

Just note that when I define fields in index template in Kibana via the UI, the passthrough field type is not in the list. Once a template already has a passthrough field, and I'd like to edit that template, the same error happens:

Image

@gregkalapos gregkalapos added the bug Fixes for quality problems that affect the customer experience label Sep 4, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 4, 2024
@felixbarny felixbarny added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Sep 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Sep 5, 2024
@dej611
Copy link
Contributor

dej611 commented Sep 5, 2024

Looked into this and the main issue is within the list of field types here which is lacking the new field type, so here the access to .label will throw and crash the page.

@felixbarny
Copy link
Member

so here the access to .label will throw and crash the page.

Maybe this would be a good opportunity to build in resilience so that the page doesn't crash if unknown field types are used.

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

Successfully merging a pull request may close this issue.

6 participants