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

Filtering null-column via the drill-through action menu causes blank screen #18386

Closed
paoliniluis opened this issue Oct 11, 2021 · 1 comment · Fixed by #18400
Closed

Filtering null-column via the drill-through action menu causes blank screen #18386

paoliniluis opened this issue Oct 11, 2021 · 1 comment · Fixed by #18400
Assignees
Labels
.Frontend Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/GUI Query builder catch-all, including simple mode .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Milestone

Comments

@paoliniluis
Copy link
Contributor

paoliniluis commented Oct 11, 2021

Describe the bug
When filtering on a table by clicking on the cell which has null values, the UI breaks and you get a blank page.

Logs
FE

``` react-dom.production.min.js:209 TypeError: Cannot read properties of null (reading 'raw') at J (selectors.js:166) at Array.map () at selectors.js:192 at n.updateIn (icepick.min.js:1) at selectors.js:191 at Array.forEach () at K (selectors.js:188) at selectors.js:220 at index.js:76 at index.js:36 os @ react-dom.production.min.js:209 o.componentDidCatch.n.callback @ react-dom.production.min.js:227 yo @ react-dom.production.min.js:131 ls @ react-dom.production.min.js:212 wu @ react-dom.production.min.js:255 t.unstable_runWithPriority @ scheduler.production.min.js:19 Vi @ react-dom.production.min.js:122 Mu @ react-dom.production.min.js:248 uu @ react-dom.production.min.js:239 (anonymous) @ react-dom.production.min.js:123 t.unstable_runWithPriority @ scheduler.production.min.js:19 Vi @ react-dom.production.min.js:122 Zi @ react-dom.production.min.js:123 Ki @ react-dom.production.min.js:122 z @ react-dom.production.min.js:287 Zt @ react-dom.production.min.js:68 react-dom.production.min.js:209 TypeError: Cannot read properties of null (reading 'raw') at J (selectors.js:166) at Array.map () at selectors.js:192 at n.updateIn (icepick.min.js:1) at selectors.js:191 at Array.forEach () at K (selectors.js:188) at selectors.js:220 at index.js:76 at index.js:36 os @ react-dom.production.min.js:209 Ms.n.callback @ react-dom.production.min.js:226 yo @ react-dom.production.min.js:131 ls @ react-dom.production.min.js:212 wu @ react-dom.production.min.js:255 t.unstable_runWithPriority @ scheduler.production.min.js:19 Vi @ react-dom.production.min.js:122 Mu @ react-dom.production.min.js:248 uu @ react-dom.production.min.js:239 (anonymous) @ react-dom.production.min.js:123 t.unstable_runWithPriority @ scheduler.production.min.js:19 Vi @ react-dom.production.min.js:122 Zi @ react-dom.production.min.js:123 Ki @ react-dom.production.min.js:122 z @ react-dom.production.min.js:287 Zt @ react-dom.production.min.js:68 react-dom.production.min.js:123 Uncaught TypeError: Cannot read properties of null (reading 'raw') at J (selectors.js:166) at Array.map () at selectors.js:192 at n.updateIn (icepick.min.js:1) at selectors.js:191 at Array.forEach () at K (selectors.js:188) at selectors.js:220 at index.js:76 at index.js:36 J @ selectors.js:166 (anonymous) @ selectors.js:192 n.updateIn @ icepick.min.js:1 (anonymous) @ selectors.js:191 K @ selectors.js:188 (anonymous) @ selectors.js:220 (anonymous) @ index.js:76 (anonymous) @ index.js:36 (anonymous) @ index.js:90 (anonymous) @ index.js:36 (anonymous) @ QueryBuilder.jsx:132 r @ wrapMapToProps.js:41 r.mapToProps @ wrapMapToProps.js:50 r @ wrapMapToProps.js:41 (anonymous) @ selectorFactory.js:22 run @ connectAdvanced.js:22 u.initSelector @ connectAdvanced.js:182 s @ connectAdvanced.js:119 xo @ react-dom.production.min.js:134 Ba @ react-dom.production.min.js:176 xs @ react-dom.production.min.js:263 vu @ react-dom.production.min.js:246 gu @ react-dom.production.min.js:246 uu @ react-dom.production.min.js:239 (anonymous) @ react-dom.production.min.js:123 t.unstable_runWithPriority @ scheduler.production.min.js:19 Vi @ react-dom.production.min.js:122 Zi @ react-dom.production.min.js:123 Ki @ react-dom.production.min.js:122 z @ react-dom.production.min.js:287 Zt @ react-dom.production.min.js:68 ```

BE

``` metabase | 2021-10-11 14:42:00,145 ERROR middleware.catch-exceptions :: Error processing query: null metabase | {:database_id 4, metabase | :started_at #t "2021-10-11T14:41:59.553812Z[GMT]", metabase | :error_type :invalid-query, metabase | :json_query metabase | {:type "query", metabase | :query {:source-table 7, :order-by [["desc" ["field" 48 nil]]], :filter [">" ["field" 47 nil] nil]}, metabase | :database 4, metabase | :parameters [], metabase | :middleware {:js-int-to-string? true, :add-default-userland-constraints? true}}, metabase | :native nil, metabase | :status :failed, metabase | :class clojure.lang.ExceptionInfo, metabase | :stacktrace metabase | ["--> util.schema$schema_core_validator$fn__18129.invoke(schema.clj:29)" metabase | "query_processor.middleware.validate$validate_query$fn__50081.invoke(validate.clj:9)" metabase | "query_processor.middleware.normalize_query$normalize$fn__50088.invoke(normalize_query.clj:22)" metabase | "query_processor.middleware.add_rows_truncated$add_rows_truncated$fn__47759.invoke(add_rows_truncated.clj:35)" metabase | "query_processor.middleware.results_metadata$record_and_return_metadata_BANG_$fn__49057.invoke(results_metadata.clj:147)" metabase | "query_processor.middleware.constraints$add_default_userland_constraints$fn__47777.invoke(constraints.clj:42)" metabase | "query_processor.middleware.process_userland_query$process_userland_query$fn__50067.invoke(process_userland_query.clj:146)" metabase | "query_processor.middleware.catch_exceptions$catch_exceptions$fn__50378.invoke(catch_exceptions.clj:169)" metabase | "query_processor.reducible$async_qp$qp_STAR___42481$thunk__42482.invoke(reducible.clj:103)" metabase | "query_processor.reducible$async_qp$qp_STAR___42481.invoke(reducible.clj:109)" metabase | "query_processor.reducible$sync_qp$qp_STAR___42490$fn__42493.invoke(reducible.clj:135)" metabase | "query_processor.reducible$sync_qp$qp_STAR___42490.invoke(reducible.clj:134)" metabase | "query_processor$process_userland_query.invokeStatic(query_processor.clj:241)" metabase | "query_processor$process_userland_query.doInvoke(query_processor.clj:237)" metabase | "query_processor$fn__51401$process_query_and_save_execution_BANG___51410$fn__51413.invoke(query_processor.clj:253)" metabase | "query_processor$fn__51401$process_query_and_save_execution_BANG___51410.invoke(query_processor.clj:245)" metabase | "query_processor$fn__51445$process_query_and_save_with_max_results_constraints_BANG___51454$fn__51457.invoke(query_processor.clj:265)" metabase | "query_processor$fn__51445$process_query_and_save_with_max_results_constraints_BANG___51454.invoke(query_processor.clj:258)" metabase | "api.dataset$run_query_async$fn__57767.invoke(dataset.clj:63)" metabase | "query_processor.streaming$streaming_response_STAR_$fn__38039$fn__38040.invoke(streaming.clj:160)" metabase | "query_processor.streaming$streaming_response_STAR_$fn__38039.invoke(streaming.clj:159)" metabase | "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)" metabase | "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)" metabase | "async.streaming_response$do_f_async$fn__25228.invoke(streaming_response.clj:84)"], metabase | :card_id nil, metabase | :context :ad-hoc, metabase | :error metabase | "Value does not match schema: {:query {:filter (named [nil nil (named (not (matches-some-precondition? nil)) \"value-or-field\")] \"Must be a valid instance of one of these clauses: :and, :or, :not, :=, :!=, :<, :>, :<=, :>=, :between, :starts-with, :ends-with, :contains, :does-not-contain, :inside, :is-empty, :not-empty, :is-null, :not-null, :time-interval, :segment\")}}", metabase | :row_count 0, metabase | :running_time 0, metabase | :preprocessed nil, metabase | :ex-data metabase | {:type :schema.core/error, metabase | :value metabase | {:type :query, metabase | :query {:source-table 7, :order-by [[:desc [:field 48 nil]]], :filter [:> [:field 47 nil] nil]}, metabase | :database 4, metabase | :middleware {:js-int-to-string? true, :add-default-userland-constraints? true}, metabase | :info metabase | {:executed-by 1, metabase | :context :ad-hoc, metabase | :nested? false, metabase | :query-hash metabase | [92, 35, -113, 85, 84, -13, 122, -14, -3, -3, -2, -116, 47, 79, 14, 125, 46, -34, -44, 92, 121, -78, 105, -73, metabase | -113, 44, -119, 25, 103, -125, -89, -43]}, metabase | :constraints {:max-results 10000, :max-results-bare-rows 2000}}, metabase | :error metabase | {:query metabase | {:filter metabase | (named [nil nil (named (not (matches-some-precondition? nil)) "value-or-field")] "Must be a valid instance of one of these clauses: :and, :or, :not, :=, :!=, :<, :>, :<=, :>=, :between, :starts-with, :ends-with, :contains, :does-not-contain, :inside, :is-empty, :not-empty, :is-null, :not-null, :time-interval, :segment")}}}, metabase | :data {:rows [], :cols []}} metabase | ```

To Reproduce

  1. grab any table with a null value
  2. click on the cell which is empty
  3. use any filter

Expected behavior
Metabase builds the filter with a null and returns a page

Screenshots
filternulls

Information about your Metabase Installation:

You can get this information by going to Admin -> Troubleshooting.

  • Your browser and the version: Brave latest
  • Your operating system: Ubuntu LTS lates
  • Your databases: Sample dataset
  • Metabase version: 41
  • Metabase hosting environment: Docker
  • Metabase internal database: Postgres

Severity
High

Additional context
Reported by a user

@paoliniluis paoliniluis added Type:Bug Product defects Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Parameters & Variables Filter widgets, field filters, variables etc. labels Oct 11, 2021
@flamber flamber added .Frontend .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. Querying/GUI Query builder catch-all, including simple mode and removed Querying/Parameters & Variables Filter widgets, field filters, variables etc. labels Oct 11, 2021
@flamber flamber added this to the 0.41.1 milestone Oct 11, 2021
@flamber flamber changed the title Filtering on null values by clicking on the cell breaks the UI Filtering null-column via the drill-through action menu causes blank screen Oct 11, 2021
@nemanjaglumac nemanjaglumac added this to Backlog in Cypress Testing Oct 11, 2021
@flamber
Copy link
Contributor

flamber commented Oct 11, 2021

Reproduce:

  1. Simple question > Sample Data > Orders
  2. Click any of the empty Discount column values
    image
  3. Select any of the action menu options < > = !=
  4. Blank screen

Workaround - filter via the sidebar Filtering button, or use the Notebook filter section.

nemanjaglumac added a commit that referenced this issue Oct 11, 2021
@nemanjaglumac nemanjaglumac added the .Reproduced Issues reproduced in test (usually Cypress) label Oct 11, 2021
@alxnddr alxnddr self-assigned this Oct 11, 2021
nemanjaglumac added a commit that referenced this issue Oct 11, 2021
…e inline context menu" (#18388)

* #18386 Repro: Cannot filter on the null values using the inline context menu (#18387)

* [ci nocache]

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/GUI Query builder catch-all, including simple mode .Regression Bugs that were previously fixed and/or bugs unintentionally shipped with new features. .Reproduced Issues reproduced in test (usually Cypress) Type:Bug Product defects
Projects
Development

Successfully merging a pull request may close this issue.

4 participants