makara-filip / ts-messenger-api

The unofficial API for FB Messenger communication
MIT License
51 stars 13 forks source link

Signing in with stored credentials now produces this error #16

Open Davidi74 opened 3 years ago

Davidi74 commented 3 years ago

Hi,

It appears something has changed and now getting this error.

It seems to work when signing in using username/password

Error: Cookie not in this host's domain. Cookie:www.facebook.com Request:www.messenger.com at CookieJar.setCookie (C:\fb\node_modules\tough-cookie\lib\cookie.js:1133:15) at CookieJar.setCookie (C:\fb\node_modules\universalify\index.js:5:67) at CookieJar.setCookieSync (C:\fb\node_modules\tough-cookie\lib\cookie.js:1642:17) at Jar.setCookie (C:\fb\node_modules\ts-messenger-api\dist\lib\jar.js:9:26) at C:\fb\node_modules\ts-messenger-api\dist\lib\utils.js:572:17 at Array.forEach () at C:\fb\node_modules\ts-messenger-api\dist\lib\utils.js:567:17 at processTicksAndRejections (node:internal/process/task_queues:96:5)

thvozdovic commented 3 years ago

Same issue here, @makiprogrammer is this project still maintained?

lv185039 commented 3 years ago

This issue is due to the way cookies are handled and written to the appstate. I have fixed this in my own internal fork of this repo, I will look over this repo and see if I can suggest a fix for it.