Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

TypeError: Cannot read property 'event' of undefined #2

Description

@noahcoffey

Hello,

I'm trying to get the webhooks plugin running and keep having an issue (see error below). This happens any time a check changes to up or down. Another note, I had to reference the plugin as 'uptime-webhooks' (instead of just 'webhooks') in the plugins/index.js file to get uptime to run at all. Not sure if that matters.

Any help you can give would be greatly appreciated.

10:39:25 CTT Test OK
Mongoose: checks.findOne({ _id: ObjectId("5464c4ee3fa410a82900000a") }) { fields: undefined, safe: undefined }
   debug - websocket writing 5:::{"name":"CheckEvent","args":[{"__v":0,"downtime":0,"check":"5464c4ee3fa410a82900000a","message":"up","_id":"5464d0add32fb6960500000b","tags":[],"timestamp":"2014-11-13T15:39:24.966Z"}]}

/home/uptime/node_modules/mongoose/lib/utils.js:413
        throw err;
              ^
TypeError: Cannot read property 'event' of undefined
    at Function.<anonymous> (/home/uptime/node_modules/uptime-webhooks/index.js:35:25)
    at Function.EventEmitter.emit (events.js:117:20)
    at model.<anonymous> (/home/uptime/node_modules/mongoose-lifecycle/index.js:39:34)
    at model.EventEmitter.emit (events.js:98:17)
    at handleSave (/home/uptime/node_modules/mongoose/lib/model.js:127:10)
    at /home/uptime/node_modules/mongoose/lib/utils.js:408:16
    at null.<anonymous> (/home/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection.js:339:9)
    at g (events.js:180:16)
    at EventEmitter.emit (events.js:106:17)
    at Server.Base._callHandler (/home/uptime/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:130:25)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions