Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-676

Autocomplete fails with compare function

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.11.0
    • Affects Version/s: None
    • Component/s: AsyncWriter
    • Labels:
      None
    • Not Needed
    • Iteration Z

      The autocomplete sometimes fails with the following error on latest master:

      > db.undefined:1148
                        if (_fs23 === "returned") return _srv23;else if (_fs23 === "threw") throw _srv23;
                                                                                            ^
      
      TypeError: compareFn is not a function
          at eval (eval at innerEval (/Users/michael.rose/Software/mongodb/mongosh/packages/shell-evaluator/lib/shell-evaluator.js:46:13), <anonymous>:1108:58)
          at Generator.next (<anonymous>)
          at eval (eval at innerEval (/Users/michael.rose/Software/mongodb/mongosh/packages/shell-evaluator/lib/shell-evaluator.js:46:13), <anonymous>:1115:65)
          at eval (eval at innerEval (/Users/michael.rose/Software/mongodb/mongosh/packages/shell-evaluator/lib/shell-evaluator.js:46:13), <anonymous>:1128:29)
          at Array.sort (<anonymous>)
          at eval (eval at innerEval (/Users/michael.rose/Software/mongodb/mongosh/packages/shell-evaluator/lib/shell-evaluator.js:46:13), <anonymous>:1083:55)
          at Array._arv9.sort (eval at innerEval (/Users/michael.rose/Software/mongodb/mongosh/packages/shell-evaluator/lib/shell-evaluator.js:46:13), <anonymous>:1146:21)
          at commonPrefix (internal/readline/utils.js:359:34)
          at PrettyREPLServer.<anonymous> (readline.js:526:20)
          at cb (util.js:207:31)
      

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            michael.rose@mongodb.com Michael Rose (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: