Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-750

Promises returned from db.collection('table').findOne({..}) are not resolved or rejected

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2.1
    • Affects Version/s: 2.1.8
    • Component/s: MongoDB 3.2
    • Environment:
      Linux

      Hello I wrote a small app to reproduce the problem , I intentionally use only 1 thenable (and one catch) for each promise .

      The program starts correctly but freezes because it is waiting for a promise to resolve or reject comming from "findOne" the small program is on github (https://github.com/jacobbogers/jkf-url-shortener), (express, node, mongo)
      To run you need to set the following environemnts
      PORT, (port number to listen to for json callbacks)
      URI_MONGO = url to your mongo db
      BASE_URI = your url (or http://localhost:3000 or something if you run locally)

      Try creating follow the instructions on the main page , if you enter new URL shortneres (using findOne 2x) it will hange
      Is this a known problem?

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            jkfbogers@gmail.com Jacob Bogers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: