fbaligand / kibana-enhanced-table

Kibana visualization like a Data Table, but with enhanced features like computed columns, filter bar, and “Split Cols” bucket
Apache License 2.0
308 stars 64 forks source link

Error: Cannot read properties of undefined (reading 'getName') #305

Open cdgh2021 opened 1 year ago

cdgh2021 commented 1 year ago

when copy some dashbord between spaces, i found an error.

STEP

  1. use kibana 8.4.1, kibana-enhanced-table-1.13.3
  2. create two kibana space A & B
  3. create a data view and a enhanced table in space A , works ok
  4. now the point copy the table into space B, using kibana "saved objects" function. the table can be viewed in space B now, but...
  5. if in space b there is no data view, the table render error

ERROR Error: Cannot read properties of undefined (reading 'getName') at A (https://www.example.com/55574/bundles/plugin/visDefaultEditor/kibana/visDefaultEditor.chunk.1.js:1:70354) at Qo (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:58290) at xs (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:107231) at Su (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:97979) at _u (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:97791) at du (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:94653) at https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:45571 at t.unstable_runWithPriority (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:428:3844) at Gi (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:45280) at Xi (https://www.example.com/55574/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:420:45516)

EXPECT like other visuals, display error nicely, and user can be able to select some other data source to fix it.

fbaligand commented 1 year ago

Hi,

I can reproduce your issue. Honestly, I don't know why behavior is different in enhanced-table visualization, compared to "standard" visualizations, especially since this is a generic feature. would have hoped that Kibana itself manages it well. And so, I don't know what to change in the plugin so that behavior is as expected.

I can only give you 2 options:

Sorry, I have no better solution.