Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

TypeError: "listener" argument must be a function #129

@bonesoul

Description

@bonesoul

getting the error after 7.7.2 node update;

uncaught exception: TypeError: "listener" argument must be a function
    at Socket.once (events.js:307:11)
    at Socket.connect (net.js:943:10)
    at Socket.<anonymous> (/root/.nvm/versions/node/v7.7.2/lib/node_modules/pm2/node_modules/async-listener/index.js:76:27)
    at Socket.connect (/var/www/firsat.io/node_modules/opbeat/lib/instrumentation/async-hooks.js:71:29)
    at Object.exports.connect.exports.createConnection (net.js:76:35)
    at Connection.connect (/var/www/firsat.io/node_modules/mongodb-core/lib/connection/connection.js:351:11)
    at Immediate.<anonymous> (/var/www/firsat.io/node_modules/mongodb-core/lib/connection/pool.js:249:20)
    at Immediate.<anonymous> (/root/.nvm/versions/node/v7.7.2/lib/node_modules/pm2/node_modules/async-listener/glue.js:188:31)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
Today 2:29:35 PM sapphiron firsatio-tasks [error] Possibly unhandled rejection at promise Promise {
  _bitField: 18087936,
  _fulfillmentHandler0: 
   TypeError: "listener" argument must be a function
       at Socket.once (events.js:307:11)
       at Socket.connect (net.js:943:10)
       at Socket.<anonymous> (/root/.nvm/versions/node/v7.7.2/lib/node_modules/pm2/node_modules/async-listener/index.js:76:27)
       at Socket.connect (/var/www/firsat.io/node_modules/opbeat/lib/instrumentation/async-hooks.js:71:29)
       at Object.exports.connect.exports.createConnection (net.js:76:35)
       at Connection.connect (/var/www/firsat.io/node_modules/mongoose/node_modules/mongodb-core/lib/connection/connection.js:399:11)
       at Pool.connect (/var/www/firsat.io/node_modules/mongoose/node_modules/mongodb-core/lib/connection/pool.js:638:16)
       at Server.connect (/var/www/firsat.io/node_modules/mongoose/node_modules/mongodb-core/lib/topologies/server.js:384:17)
       at Server.connect (/var/www/firsat.io/node_modules/mongoose/node_modules/mongodb/lib/server.js:361:17)
       at open (/var/www/firsat.io/node_modules/mongoose/node_modules/mongodb/lib/db.js:226:19)
       at Db.open (/var/www/firsat.io/node_modules/mongoose/node_modules/mongodb/lib/db.js:249:44)
       at NativeConnection.doOpen (/var/www/firsat.io/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:58:11)
       at NativeConnection.Connection._open (/var/www/firsat.io/node_modules/mongoose/lib/connection.js:531:15)
       at /var/www/firsat.io/node_modules/mongoose/lib/connection.js:289:11
       at Promise._execute (/var/www/firsat.io/node_modules/bluebird/js/release/debuggability.js:300:9)
       at Promise._resolveFromExecutor (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:483:18)
       at new Promise (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:79:10)
       at NativeConnection.Connection.open (/var/www/firsat.io/node_modules/mongoose/lib/connection.js:288:17)
       at Mongoose.connect (/var/www/firsat.io/node_modules/mongoose/lib/index.js:242:47)
       at /var/www/firsat.io/src/lib/db/mongodb.js:25:12
       at Object.<anonymous> (/var/www/firsat.io/src/lib/db/mongodb.js:45:3)
       at Module._compile (module.js:571:32)
       at Object.Module._extensions..js (module.js:580:10)
       at Module.load (module.js:488:32)
       at tryModuleLoad (module.js:447:12)
       at Function.Module._load [as _load__RS_original] (module.js:439:3)
       at Function.<anonymous> (/var/www/firsat.io/node_modules/@risingstack/trace/lib/instrumentations/index.js:146:21)
       at Function.Module._load (/var/www/firsat.io/node_modules/require-in-the-middle/index.js:22:24)
       at Module.require (module.js:498:17)
       at require (internal/module.js:20:19)
       at /var/www/firsat.io/src/taskrunner.js:67:7
       at Promise._execute (/var/www/firsat.io/node_modules/bluebird/js/release/debuggability.js:300:9)
       at Promise._resolveFromExecutor (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:483:18)
       at new Promise (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:79:10)
       at /var/www/firsat.io/src/taskrunner.js:66:12
       at tryCatcher (/var/www/firsat.io/node_modules/bluebird/js/release/util.js:16:23)
       at Promise._settlePromiseFromHandler (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:512:31)
       at Promise._settlePromise (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:569:18)
       at Promise._settlePromise0 (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:614:10)
       at Promise._settlePromises (/var/www/firsat.io/node_modules/bluebird/js/release/promise.js:693:18)
       at Async._drainQueue (/var/www/firsat.io/node_modules/bluebird/js/release/async.js:133:16)
       at Async._drainQueues (/var/www/firsat.io/node_modules/bluebird/js/release/async.js:143:10)
       at Immediate.Async.drainQueues (/var/www/firsat.io/node_modules/bluebird/js/release/async.js:17:14)
       at runCallback (timers.js:666:20)
       at tryOnImmediate (timers.js:639:5)
       at processImmediate [as _immediateCallback] (timers.js:611:5),
  _rejectionHandler0: undefined,
  _promise0: undefined,
  _receiver0: undefined }
Today 2:29:51 PM sapphiron firsatio-tasks [error] uncaught exception: TypeError: "listener" argument must be a function
    at Socket.once (events.js:307:11)
    at Socket.connect (net.js:943:10)
    at Socket.<anonymous> (/root/.nvm/versions/node/v7.7.2/lib/node_modules/pm2/node_modules/async-listener/index.js:76:27)
    at Socket.connect (/var/www/firsat.io/node_modules/opbeat/lib/instrumentation/async-hooks.js:71:29)
    at Object.exports.connect.exports.createConnection (net.js:76:35)
    at Connection.connect (/var/www/firsat.io/node_modules/mongodb-core/lib/connection/connection.js:351:11)
    at Immediate.<anonymous> (/var/www/firsat.io/node_modules/mongodb-core/lib/connection/pool.js:249:20)
    at Immediate.<anonymous> (/root/.nvm/versions/node/v7.7.2/lib/node_modules/pm2/node_modules/async-listener/glue.js:188:31)
    at runCallback (timers.js:666:20)
    at tryOnImmediate (timers.js:639:5)
    at processImmediate [as _immediateCallback] (timers.js:611:5)
Today 2:29:53 PM sapphiron firsatio-tasks [error] Possibly unhandled rejection at promise Promise {
  _bitField: 18087936,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions