passport icon indicating copy to clipboard operation
passport copied to clipboard

promise was created in a handler... but was not returned from it

Open tobymurray opened this issue 7 years ago • 6 comments

Environment

$ node --version v7.5.0

Passport version: 0.3.2 Passport-strategy: 1.0.0 Bluebird: 3.5.0

I'm seeing this warning every time I try and authenticate using passport:

(node:1072) Warning: a promise was created in a handler at ...node_modules/passport/lib/authenticator.js:339:7 but was not returned from it, see http://goo.gl/rRqMUw
    at Function.Promise.attempt.Promise.try (...node_modules/bluebird/js/release/method.js:29:9)

Is this expected? Is something I'm using incompatible with something else?

tobymurray avatar Mar 19 '17 02:03 tobymurray

Same here. This should be fixed.

seancheung avatar Apr 24 '17 13:04 seancheung

I am getting this warning in this context:

passport.use(new LocalStrategy(
  {
    usernameField: 'email',
    passwordField: 'password'
  },
  function (username, password, done) {

    // Search for the user
    knex('users').first()
      .where({ 'email': username })
      .then(user => {
        // If no user is found
        if (!user) {
          console.log(`[Authentication] User not found: ${username}`)
          return done(null, false, { message: 'Incorrect credentials' }) <--- Warning happens here
        }
    ....
  })
))

Is this going to fixed sometime soon?

Jakobud avatar Mar 26 '19 23:03 Jakobud

Seems like this project is a zombie, so I'll close this.

tobymurray avatar Jul 13 '19 21:07 tobymurray

Is passport not being maintained anymore?

Jakobud avatar Jul 14 '19 16:07 Jakobud

I have the same issue, does anyone find a solution yet?

simonppg avatar Feb 22 '20 01:02 simonppg

I am getting this warning specifically for a http delete request

ahsan98 avatar May 19 '20 20:05 ahsan98