Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot Crash When Replied To #6

Open
ibrokemypie opened this issue Oct 16, 2016 · 4 comments
Open

Bot Crash When Replied To #6

ibrokemypie opened this issue Oct 16, 2016 · 4 comments

Comments

@ibrokemypie
Copy link

ibrokemypie commented Oct 16, 2016

info Got answer in  624
ERR! ERROR in listen -->  TypeError: Cannot read property 'length' of undefined
ERR! ERROR in listen -->      at callback (/Users/Conor/FacebookBot/facebookbot.js:149:36)
ERR! ERROR in listen -->      at parsePackets (/Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:161:22)
ERR! ERROR in listen -->      at Array.forEach (native)
ERR! ERROR in listen -->      at /Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:108:12
ERR! ERROR in listen -->      at tryCatcher (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/util.js:26:23)
ERR! ERROR in listen -->      at Promise._settlePromiseFromHandler (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:510:31)
ERR! ERROR in listen -->      at Promise._settlePromiseAt (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:584:18)
ERR! ERROR in listen -->      at Promise._settlePromises (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:700:14)
ERR! ERROR in listen -->      at Async._drainQueue (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:123:16)
ERR! ERROR in listen -->      at Async._drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:133:10)
ERR! ERROR in listen -->      at Immediate.Async.drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:15:14)
ERR! ERROR in listen -->      at runCallback (timers.js:570:20)
ERR! ERROR in listen -->      at tryOnImmediate (timers.js:550:5)
ERR! ERROR in listen -->      at processImmediate [as _immediateCallback] (timers.js:529:5)
ERR! ERROR in listen -->   TypeError: Cannot read property 'length' of undefined
ERR! ERROR in listen -->      at callback (/Users/Conor/FacebookBot/facebookbot.js:149:36)
ERR! ERROR in listen -->      at parsePackets (/Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:161:22)
ERR! ERROR in listen -->      at Array.forEach (native)
ERR! ERROR in listen -->      at /Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:108:12
ERR! ERROR in listen -->      at tryCatcher (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/util.js:26:23)
ERR! ERROR in listen -->      at Promise._settlePromiseFromHandler (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:510:31)
ERR! ERROR in listen -->      at Promise._settlePromiseAt (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:584:18)
ERR! ERROR in listen -->      at Promise._settlePromises (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:700:14)
ERR! ERROR in listen -->      at Async._drainQueue (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:123:16)
ERR! ERROR in listen -->      at Async._drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:133:10)
ERR! ERROR in listen -->      at Immediate.Async.drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:15:14)
ERR! ERROR in listen -->      at runCallback (timers.js:570:20)
ERR! ERROR in listen -->      at tryOnImmediate (timers.js:550:5)
ERR! ERROR in listen -->      at processImmediate [as _immediateCallback] (timers.js:529:5)
Unhandled rejection TypeError: Cannot read property 'senderName' of undefined
    at callback (/Users/Conor/FacebookBot/facebookbot.js:148:26)
    at /Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:218:9
    at tryCatcher (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:570:20)
    at tryOnImmediate (timers.js:550:5)
    at processImmediate [as _immediateCallback] (timers.js:529:5)
@Liryna
Copy link
Owner

Liryna commented Oct 16, 2016

Hello @ibrokemypie ,

Seems like senderName from https://github.com/Schmavery/facebook-chat-api is null for a reason.
Can you try to update dependancy ?

@ibrokemypie
Copy link
Author

ibrokemypie commented Oct 17, 2016

@Liryna
downloaded the latest version of facebook-chat-api and stuck it in modules over the old one, same problem

info Got answer in  1803
ERR! ERROR in listen -->  TypeError: Cannot read property 'length' of undefined
ERR! ERROR in listen -->      at callback (/Users/Conor/FacebookBot/facebookbot.js:149:36)
ERR! ERROR in listen -->      at handleMessagingEvents (/Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:47:9)
ERR! ERROR in listen -->      at parsePackets (/Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:164:19)
ERR! ERROR in listen -->      at Array.forEach (native)
ERR! ERROR in listen -->      at /Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:108:12
ERR! ERROR in listen -->      at tryCatcher (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/util.js:26:23)
ERR! ERROR in listen -->      at Promise._settlePromiseFromHandler (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:510:31)
ERR! ERROR in listen -->      at Promise._settlePromiseAt (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:584:18)
ERR! ERROR in listen -->      at Promise._settlePromises (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:700:14)
ERR! ERROR in listen -->      at Async._drainQueue (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:123:16)
ERR! ERROR in listen -->      at Async._drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:133:10)
ERR! ERROR in listen -->      at Immediate.Async.drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:15:14)
ERR! ERROR in listen -->      at runCallback (timers.js:570:20)
ERR! ERROR in listen -->      at tryOnImmediate (timers.js:550:5)
ERR! ERROR in listen -->      at processImmediate [as _immediateCallback] (timers.js:529:5)
ERR! ERROR in listen -->   TypeError: Cannot read property 'length' of undefined
ERR! ERROR in listen -->      at callback (/Users/Conor/FacebookBot/facebookbot.js:149:36)
ERR! ERROR in listen -->      at handleMessagingEvents (/Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:47:9)
ERR! ERROR in listen -->      at parsePackets (/Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:164:19)
ERR! ERROR in listen -->      at Array.forEach (native)
ERR! ERROR in listen -->      at /Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:108:12
ERR! ERROR in listen -->      at tryCatcher (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/util.js:26:23)
ERR! ERROR in listen -->      at Promise._settlePromiseFromHandler (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:510:31)
ERR! ERROR in listen -->      at Promise._settlePromiseAt (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:584:18)
ERR! ERROR in listen -->      at Promise._settlePromises (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:700:14)
ERR! ERROR in listen -->      at Async._drainQueue (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:123:16)
ERR! ERROR in listen -->      at Async._drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:133:10)
ERR! ERROR in listen -->      at Immediate.Async.drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:15:14)
ERR! ERROR in listen -->      at runCallback (timers.js:570:20)
ERR! ERROR in listen -->      at tryOnImmediate (timers.js:550:5)
ERR! ERROR in listen -->      at processImmediate [as _immediateCallback] (timers.js:529:5)
Unhandled rejection TypeError: Cannot read property 'senderName' of undefined
    at callback (/Users/Conor/FacebookBot/facebookbot.js:148:26)
    at /Users/Conor/FacebookBot/node_modules/facebook-chat-api/src/listen.js:218:9
    at tryCatcher (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/Users/Conor/FacebookBot/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:570:20)
    at tryOnImmediate (timers.js:550:5)
    at processImmediate [as _immediateCallback] (timers.js:529:5)

@Liryna
Copy link
Owner

Liryna commented Oct 17, 2016

@ibrokemypie I am not really using the bot anymore 😢
I think this is probably not a big problem. Do you think you can look into it ?

@ibrokemypie
Copy link
Author

@Liryna i can certainly try, however never used node before and have very little knowledge of js, so i guess we will see how far i get.
sending works, its just receiving that is broken and causes this error every time from any sender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants