-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Feature:DiscoverDiscover ApplicationDiscover ApplicationTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//blockerbugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceregressionv7.10.0
Description
Branch: master / 7.x (?)
I ran into scenarios (where I simply installed sample data, as far as I can recall), where unknown fields in the discover field list can cause it to break:
The products field on the very bottom (a) does not have a label anymore and (b) when clicking it the whole field list vanishes, since it throws the following JS error:
field_calculator.js:24 Uncaught TypeError: Cannot read property 'flattenHit' of undefined
at getFieldValues (field_calculator.js:24)
at Object.getFieldValueCounts (field_calculator.js:44)
at getDetails (get_details.ts:25)
at discover_sidebar.tsx:71
at DiscoverField (discover_field.tsx:112)
at renderWithHooks (react-dom.development.js:16260)
at updateFunctionComponent (react-dom.development.js:18347)
at beginWork$1 (react-dom.development.js:20176)
at HTMLUnknownElement.callCallback (react-dom.development.js:336)
at Object.invokeGuardedCallbackDev (react-dom.development.js:385)
getFieldValues @ field_calculator.js:24
getFieldValueCounts @ field_calculator.js:44
getDetails @ get_details.ts:25
(anonymous) @ discover_sidebar.tsx:71
DiscoverField @ discover_field.tsx:112
renderWithHooks @ react-dom.development.js:16260
updateFunctionComponent @ react-dom.development.js:18347
beginWork$1 @ react-dom.development.js:20176
callCallback @ react-dom.development.js:336
invokeGuardedCallbackDev @ react-dom.development.js:385
invokeGuardedCallback @ react-dom.development.js:440
beginWork$$1 @ react-dom.development.js:25780
performUnitOfWork @ react-dom.development.js:24695
workLoopSync @ react-dom.development.js:24671
performSyncWorkOnRoot @ react-dom.development.js:24270
(anonymous) @ react-dom.development.js:12199
unstable_runWithPriority @ scheduler.development.js:697
runWithPriority$2 @ react-dom.development.js:12149
flushSyncCallbackQueueImpl @ react-dom.development.js:12194
flushSyncCallbackQueue @ react-dom.development.js:12182
discreteUpdates$1 @ react-dom.development.js:24423
discreteUpdates @ react-dom.development.js:1438
dispatchDiscreteEvent @ react-dom.development.js:5881
react_devtools_backend.js:2273 The above error occurred in the <DiscoverField> component:
in DiscoverField (created by DiscoverSidebar)
in li (created by DiscoverSidebar)
in ul (created by DiscoverSidebar)
in div (created by DiscoverSidebar)
in section (created by DiscoverSidebar)
in PseudoLocaleWrapper (created by I18nProvider)
in IntlProvider (created by I18nProvider)
in I18nProvider (created by DiscoverSidebar)
in DiscoverSidebar
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.
overrideMethod @ react_devtools_backend.js:2273
logCapturedError @ react-dom.development.js:21843
logError @ react-dom.development.js:21880
update.callback @ react-dom.development.js:23232
callCallback @ react-dom.development.js:13829
commitUpdateEffects @ react-dom.development.js:13867
commitUpdateQueue @ react-dom.development.js:13857
commitLifeCycles @ react-dom.development.js:22160
commitLayoutEffects @ react-dom.development.js:25344
callCallback @ react-dom.development.js:336
invokeGuardedCallbackDev @ react-dom.development.js:385
invokeGuardedCallback @ react-dom.development.js:440
commitRootImpl @ react-dom.development.js:25082
unstable_runWithPriority @ scheduler.development.js:697
runWithPriority$2 @ react-dom.development.js:12149
commitRoot @ react-dom.development.js:24922
finishSyncRender @ react-dom.development.js:24329
performSyncWorkOnRoot @ react-dom.development.js:24307
(anonymous) @ react-dom.development.js:12199
unstable_runWithPriority @ scheduler.development.js:697
runWithPriority$2 @ react-dom.development.js:12149
flushSyncCallbackQueueImpl @ react-dom.development.js:12194
flushSyncCallbackQueue @ react-dom.development.js:12182
discreteUpdates$1 @ react-dom.development.js:24423
discreteUpdates @ react-dom.development.js:1438
dispatchDiscreteEvent @ react-dom.development.js:5881
react-dom.development.js:12212 Uncaught TypeError: Cannot read property 'flattenHit' of undefined
at getFieldValues (field_calculator.js:24)
at Object.getFieldValueCounts (field_calculator.js:44)
at getDetails (get_details.ts:25)
at discover_sidebar.tsx:71
at DiscoverField (discover_field.tsx:112)
at renderWithHooks (react-dom.development.js:16260)
at updateFunctionComponent (react-dom.development.js:18347)
at beginWork$1 (react-dom.development.js:20176)
at HTMLUnknownElement.callCallback (react-dom.development.js:336)
at Object.invokeGuardedCallbackDev (react-dom.development.js:385)
It seems for that field the indexPattern on the field property is not defined (maybe because it's mixed in by discover?) what causes it to break.
Metadata
Metadata
Assignees
Labels
Feature:DiscoverDiscover ApplicationDiscover ApplicationTeam:VisualizationsTeam label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//blockerbugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experienceregressionv7.10.0
