Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-3652

$type in query filter on Schema tab blanks entire tab with javascript errors

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.18.0
    • Component/s: Compass
    • None
    • Iteration Giraffe

      Simply typing/pasting the following query filter into the Schema tab causes the entire tab to go blank and javascript errors in the console.

      {viewerRating: {$type: false}}
      

      The attached screenshot shows the behavior on the video.movies collection in the M001 student cluster where the "viewerRating" is one of the fields.

      This appears to be the new content in the DevTools console after entering the $type operator:

      TypeError: Expected a function
          at createWrap (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/lodash.curryright/index.js:712)
          at curryRight (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/lodash.curryright/index.js:957)
          at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/lib/inValueRange.js:65
          at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/node_modules/lodash.forown/index.js:161
          at baseForOwn (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/node_modules/lodash.forown/index.js:122)
          at forOwn (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/node_modules/lodash.forown/index.js:447)
          at inValueRange (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/lib/inValueRange.js:63)
          at SVGRectElement.<anonymous> (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/src/internal-plugins/schema/lib/d3/many.js:222)
          at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/d3/d3.js:962
          at d3_selection_each (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/d3/d3.js:968)
      object.(anonymous function) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:661
      Kg @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:179
      Vg.c.callback @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:190
      vf @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:128
      uf @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:128
      Sh @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:229
      Ph @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:220
      Qh @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:219
      sh @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:216
      Uf @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:214
      enqueueSetState @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:134
      G.setState @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react/cjs/react.production.min.js:13
      onQueryChanged @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/src/internal-plugins/schema/lib/component/minichart.jsx:37
      eventHandler @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/PublisherMethods.js:44
      emit @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/node_modules/eventemitter3/index.js:137
      trigger @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/PublisherMethods.js:63
      setState @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-state-mixin/lib/storeMixin.js:48
      _stoppedTyping @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-query-bar/lib/index.js:10
      _super.bugsnag @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:279
      (anonymous) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:1252
      setTimeout (async)
      (anonymous) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:1251
      typeQueryString @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-query-bar/lib/index.js:10
      eventHandler @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/PublisherMethods.js:44
      emit @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/node_modules/eventemitter3/index.js:116
      trigger @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/PublisherMethods.js:63
      (anonymous) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/PublisherMethods.js:74
      _super.bugsnag @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:279
      (anonymous) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:1252
      setTimeout (async)
      (anonymous) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:1251
      exports.nextTick @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/utils.js:60
      triggerAsync @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/PublisherMethods.js:73
      functor @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/reflux-core/lib/createAction.js:56
      value @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-query-bar/lib/index.js:405
      n.onChangeQuery @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/@mongodb-js/compass-query-bar/lib/index.js:405
      onChange @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-ace/lib/ace.js:262
      EventEmitter._signal @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:3865
      onDocumentChange @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:13292
      EventEmitter._signal @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:3865
      onChange @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:9805
      EventEmitter._signal @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:3865
      applyDelta @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:7955
      insertMergedLines @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:7853
      insert @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:7781
      insert @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:10322
      insert @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:13532
      $handlePaste @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:13468
      exec @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:12490
      (anonymous) @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:11979
      EventEmitter._emit.EventEmitter._dispatchEvent @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:3855
      exec @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:12010
      onPaste @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:13459
      onPaste @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/brace/index.js:2608
      _super.bugsnag @ /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/bugsnag-js/src/bugsnag.js:279
      /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.production.min.js:219 Uncaught TypeError: Expected a function
          at createWrap (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/lodash.curryright/index.js:712)
          at curryRight (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/lodash.curryright/index.js:957)
          at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/lib/inValueRange.js:65
          at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/node_modules/lodash.forown/index.js:161
          at baseForOwn (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/node_modules/lodash.forown/index.js:122)
          at forOwn (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/node_modules/lodash.forown/index.js:447)
          at inValueRange (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/mongodb-query-util/lib/inValueRange.js:63)
          at SVGRectElement.<anonymous> (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/src/internal-plugins/schema/lib/d3/many.js:222)
          at /Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/d3/d3.js:962
          at d3_selection_each (/Applications/MongoDB Compass.app/Contents/Resources/app.asar/node_modules/d3/d3.js:968)
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            brian.blevins@mongodb.com Brian Blevins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: