chen-ye / hubot-fb

A Hubot adapter for the Facebook Messenger Platform
https://www.npmjs.com/package/hubot-fb
87 stars 21 forks source link

error on receiveing messages #21

Open victorbuttner opened 7 years ago

victorbuttner commented 7 years ago

Hi,

I'm receveing an error when the webhook is called. Did you know what it could be ?

017-08-23T18:34:09.426606+00:00 app[web.1]: [Wed Aug 23 2017 18:34:09 GMT+0000 (UTC)] INFO /app/scripts/social.coffee is using deprecated documentation syntax 2017-08-23T18:34:09.600829+00:00 app[web.1]: [Wed Aug 23 2017 18:34:09 GMT+0000 (UTC)] INFO hubot-redis-brain: Using default redis on localhost:6379 2017-08-23T18:34:09.379841+00:00 app[web.1]: [Wed Aug 23 2017 18:34:09 GMT+0000 (UTC)] INFO hubot-messenger-bot: Adapter loaded. 2017-08-23T18:34:09.383405+00:00 app[web.1]: [Wed Aug 23 2017 18:34:09 GMT+0000 (UTC)] INFO hubot-messenger-bot: Adapter running. 2017-08-23T18:34:10.058992+00:00 heroku[web.1]: State changed from starting to up 2017-08-23T18:39:09.262913+00:00 heroku[router]: at=info method=POST path="/webhook/" host=facebook-botchat.herokuapp.com request_id=4a92dfbc-500e-4558-b6b1-6db016227335 fwd="66.220.156.180" dyno=web.1 connect=0ms service=33ms status=500 bytes=242 protocol=https 2017-08-23T18:39:09.267999+00:00 app[web.1]: TypeError: Cannot read property 'length' of undefined 2017-08-23T18:39:09.268016+00:00 app[web.1]: at /app/node_modules/hubot-messenger-bot/src/messenger.coffee:77:13 2017-08-23T18:39:09.268022+00:00 app[web.1]: at callbacks (/app/node_modules/hubot/node_modules/express/lib/router/index.js:164:37) 2017-08-23T18:39:09.268023+00:00 app[web.1]: at param (/app/node_modules/hubot/node_modules/express/lib/router/index.js:138:11) 2017-08-23T18:39:09.268024+00:00 app[web.1]: at pass (/app/node_modules/hubot/node_modules/express/lib/router/index.js:145:5) 2017-08-23T18:39:09.268025+00:00 app[web.1]: at Router._dispatch (/app/node_modules/hubot/node_modules/express/lib/router/index.js:173:5) 2017-08-23T18:39:09.268025+00:00 app[web.1]: at Object.router (/app/node_modules/hubot/node_modules/express/lib/router/index.js:33:10) 2017-08-23T18:39:09.268026+00:00 app[web.1]: at next (/app/node_modules/hubot/node_modules/express/node_modules/connect/lib/proto.js:174:15) 2017-08-23T18:39:09.268027+00:00 app[web.1]: at Object.multipart [as handle] (/app/node_modules/hubot/node_modules/connect-multiparty/index.js:42:27) 2017-08-23T18:39:09.268027+00:00 app[web.1]: at next (/app/node_modules/hubot/node_modules/express/node_modules/connect/lib/proto.js:174:15) 2017-08-23T18:39:09.268029+00:00 app[web.1]: at Object.urlencodedParser [as handle] (/app/node_modules/hubot/node_modules/express/node_modules/connect/node_modules/body-parser/lib/types/urlencoded.js:81:44) 2017-08-23T18:39:09.268030+00:00 app[web.1]: at next (/app/node_modules/hubot/node_modules/express/node_modules/connect/lib/proto.js:174:15) 2017-08-23T18:39:09.268031+00:00 app[web.1]: at /app/node_modules/hubot/node_modules/express/node_modules/connect/node_modules/body-parser/lib/read.js:121:5 2017-08-23T18:39:09.268032+00:00 app[web.1]: at invokeCallback (/app/node_modules/hubot/node_modules/express/node_modules/connect/node_modules/body-parser/node_modules/raw-body/index.js:262:16) 2017-08-23T18:39:09.268034+00:00 app[web.1]: at done (/app/node_modules/hubot/node_modules/express/node_modules/connect/node_modules/body-parser/node_modules/raw-body/index.js:251:7) 2017-08-23T18:39:09.268035+00:00 app[web.1]: at IncomingMessage.onEnd (/app/node_modules/hubot/node_modules/express/node_modules/connect/node_modules/body-parser/node_modules/raw-body/index.js:307:7) 2017-08-23T18:39:09.268036+00:00 app[web.1]: at IncomingMessage.emit (events.js:92:17) 2017-08-23T18:39:09.268036+00:00 app[web.1]: at _stream_readable.js:944:16 2017-08-23T18:39:09.268037+00:00 app[web.1]: at process._tickCallback (node.js:458:13)