Facebook-chat-api: Error: parseAndCheckLogin got status code: 404

Created on 25 Mar 2020  路  3Comments  路  Source: Schmavery/facebook-chat-api

After installing the current master branch to apply the fix for #794, I now get the following error:

info login Logging in...
info login Logged in
info login Request to reconnect
info login Done logging in.
Saved appState.json
ERR! listen Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! listen     at /app/node_modules/facebook-chat-api/utils.js:1042:15
ERR! listen     at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
ERR! listen     at Function.Promise.attempt.Promise.try (/app/node_modules/bluebird/js/release/method.js:39:29)
ERR! listen     at /app/node_modules/facebook-chat-api/utils.js:989:24
ERR! listen     at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
ERR! listen     at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
ERR! listen     at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
ERR! listen     at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
ERR! listen     at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
ERR! listen     at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)
ERR! listen     at Promise._resolveCallback (/app/node_modules/bluebird/js/release/promise.js:466:57)
ERR! listen     at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:559:17)
ERR! listen     at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
ERR! listen     at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
ERR! listen     at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
ERR! listen     at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)
ERR! listen  Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! listen     at /app/node_modules/facebook-chat-api/utils.js:1042:15
ERR! listen     at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
ERR! listen     at Function.Promise.attempt.Promise.try (/app/node_modules/bluebird/js/release/method.js:39:29)
ERR! listen     at /app/node_modules/facebook-chat-api/utils.js:989:24
ERR! listen     at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
ERR! listen     at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
ERR! listen     at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
ERR! listen     at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
ERR! listen     at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
ERR! listen     at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)
ERR! listen     at Promise._resolveCallback (/app/node_modules/bluebird/js/release/promise.js:466:57)
ERR! listen     at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:559:17)
ERR! listen     at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
ERR! listen     at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
ERR! listen     at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:729:18)
ERR! listen     at Promise._fulfill (/app/node_modules/bluebird/js/release/promise.js:673:18)

This message repeats indefinitely until the process is stopped. I've confirmed this behavior with multiple accounts, including a brand new whitehat account. It also happens whether I'm using a months-old appState, one that was created today, or logging in fresh.

Most helpful comment

Ugh, I've been following the progress on MQTT support for months now and still somehow didn't think to change that part. You're right, that's all that was wrong, and everything's working now.

It might be good to either update the docs/example in the README or even just alias listenMqtt to listen since the old method no longer works and the new one is a drop-in replacement.

All 3 comments

782

api.listen cannot be used anymore, use api.listenMqtt instead.

Ugh, I've been following the progress on MQTT support for months now and still somehow didn't think to change that part. You're right, that's all that was wrong, and everything's working now.

It might be good to either update the docs/example in the README or even just alias listenMqtt to listen since the old method no longer works and the new one is a drop-in replacement.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hraph picture Hraph  路  6Comments

GEOFBOT picture GEOFBOT  路  4Comments

ezaca picture ezaca  路  3Comments

tomekb530 picture tomekb530  路  6Comments

MikeShi42 picture MikeShi42  路  9Comments