facebook-chat-api icon indicating copy to clipboard operation
facebook-chat-api copied to clipboard

500 & 404 error code

Open lukyrys opened this issue 5 years ago • 17 comments

I have often returning error. Version 1.6.1

WARN parseAndCheckLogin Got status code 500 - 1. attempt to retry in 3382 milliseconds...
ERR! markAsRead Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
ERR! markAsRead  Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
    at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

lukyrys avatar Jan 27 '20 14:01 lukyrys

did you try using bleeding edge?

BadAimWeeb avatar Jan 27 '20 15:01 BadAimWeeb

@lequanglam how is it used? , help me plis!

Theblood avatar Jan 28 '20 00:01 Theblood

@lukyrys @Theblood I just published 1.7.0, you can try that and see if it helps. https://www.npmjs.com/package/facebook-chat-api/v/1.7.0

Schmavery avatar Jan 28 '20 08:01 Schmavery

@Schmavery problem persist with 1.7.0

ERR! markAsRead Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
ERR! markAsRead  Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
    at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

lukyrys avatar Jan 28 '20 14:01 lukyrys

found error, is a 404 code not exist "https://www.facebook.com/chat/user_info_all"

Theblood avatar Jan 29 '20 23:01 Theblood

found error, is a 404 code not exist "https://www.facebook.com/chat/user_info_all"

you can't access these link by typing it into address bar. btw markAsRead is perfectly fine here, not sure why.

BadAimWeeb avatar Jan 31 '20 07:01 BadAimWeeb

@Schmavery problem persist with 1.7.0

ERR! markAsRead Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
ERR! markAsRead  Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
    at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

same problem here, any update ? D41C20AC-D96C-4227-8CF1-3617FBDC7F13

CatalizCS avatar Mar 22 '20 08:03 CatalizCS

oh well, i'm currently testing markAsSeen (required before calling markAsRead) on my forked repository fca-unofficial (somehow it's missing here, even through it's required)

BadAimWeeb avatar Mar 23 '20 10:03 BadAimWeeb

@Schmavery problem persist with 1.7.0

ERR! markAsRead Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
ERR! markAsRead  Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
ERR! markAsRead     at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
ERR! markAsRead     at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
ERR! markAsRead     at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
ERR! markAsRead     at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
ERR! markAsRead     at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
ERR! markAsRead     at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
ERR! markAsRead     at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
ERR! markAsRead     at runCallback (timers.js:705:18)
ERR! markAsRead     at tryOnImmediate (timers.js:676:5)
ERR! markAsRead     at processImmediate (timers.js:658:5)
Error: parseAndCheckLogin got status code: 404. Bailing out of trying to parse response.
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:1042:15
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Function.Promise.attempt.Promise.try (/home/pogo/fb/node_modules/bluebird/js/main/method.js:31:24)
    at /home/pogo/fb/node_modules/facebook-chat-api/utils.js:989:24
    at tryCatcher (/home/pogo/fb/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/home/pogo/fb/node_modules/bluebird/js/main/promise.js:584:18)
    at Async._drainQueue (/home/pogo/fb/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/home/pogo/fb/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/pogo/fb/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)

same problem here, any update ? D41C20AC-D96C-4227-8CF1-3617FBDC7F13

I'm having this on the bleeding edge too.

j4pa0 avatar Mar 24 '20 06:03 j4pa0

Have anyone managed to fix this?

kalucky0 avatar Apr 13 '20 20:04 kalucky0

Have anyone managed to fix this?

try using api.listenMqtt, not api.listen

j4pa0 avatar Apr 14 '20 00:04 j4pa0

@japaodsc I'm using listenMqtt

kalucky0 avatar Apr 14 '20 07:04 kalucky0

That's my code

login({email: "[email protected]", password: "password"}, (err, api) => {
    if (err) return console.error(err);

    api.listenMqtt((err, message) => {
        if (err) return console.error(err);

        if (message.body !== undefined) {
            // api.markAllAsRead();
            api.markAsRead(message.threadID);
        }
    });
});

kalucky0 avatar Apr 14 '20 10:04 kalucky0

@lequanglam how is markAsSeen going? I'm starting to investigate it right now, if you could share your progress I would appreciate it.

kalucky0 avatar Apr 14 '20 16:04 kalucky0

look like it's OK. i'm not sure, but i didn't see error last couple weeks.

BadAimWeeb avatar Apr 15 '20 16:04 BadAimWeeb

Yesterday there were no errors, today morning were a lot of errors, now there are none. Seems pretty random to me.

kalucky0 avatar Apr 15 '20 17:04 kalucky0

I'm using bleeding edge and everything seems great (used to have this kind of error, but now there are no more for the markAsRead, at least for one week now).

j4pa0 avatar Apr 15 '20 17:04 j4pa0