Skip to content

[Lens] Lens editor crashes when switching to  #88890

Closed

Description

Kibana version: master at f0f192c

Describe the bug:

When transitioning to Last value from an operation with a string field set, the editor crashes at validation time.

Steps to reproduce:

  1. Open Lens editor and drop an field into the workspace
  2. Click on the Vertical axis dimension "Count of Records"
  3. Now click on "Unique count" and select a string field
  4. Click on "Last value"
  5. 💥

Expected behavior:

The field is marked as non valid and a warning is shown to the user about changing to a valid value.

Screenshots (if relevant):

string_field_crashes

Errors in browser console (if relevant):

Uncaught TypeError: Cannot read property 'sortField' of undefined
    at Object.getErrorMessage (last_value.tsx:126)
    at layer_helpers.ts:801
    at Array.forEach (<anonymous>)
    at getErrorMessages (layer_helpers.ts:790)
    at indexpattern.tsx:303
    at Array.map (<anonymous>)
    at Object.getErrorMessages (indexpattern.tsx:300)
    at validateDatasourceAndVisualization (state_helpers.ts:78)
    at workspace_panel.tsx:72
    at updateMemo (react-dom.development.js:16854)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Feature:LensTeam:VisualizationsVisualization editors, elastic-charts and infrastructurebugFixes for quality problems that affect the customer experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions