facebook-chat-api
facebook-chat-api copied to clipboard
api.getThreadHistory - Cannot read property 'id' of null - d.sticker.pack.id
At some point on the 14th June my bot started throwing errors after calling api.getThreadHistory. The full stack trace of the error is below, but begins with Cannot read property 'id' of null
which refers back to line 374 of getThreadHistory.js. This is trying to read the sticker pack id.
It doesn't look like I've received an unusual message, so maybe Facebook has made a change?
Stack Trace:
TypeError: Cannot read property 'id' of null
at /.../ShellScripts/Facebook/facebook-chat-api/src/getThreadHistory.js:374:38
at Array.map (<anonymous>)
at formatMessagesGraphQLResponse (/.../ShellScripts/Facebook/facebook-chat-api/src/getThreadHistory.js:361:47)
at /.../ShellScripts/Facebook/facebook-chat-api/src/getThreadHistory.js:625:24
at tryCatcher (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:489:14)
at Promise._settlePromiseFromHandler (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/.../ShellScripts/Facebook/node_modules/bluebird/js/release/promise.js:673:18)