question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't login in v2.0.0a3 but can in previous versions

See original GitHub issue

Description of the problem

Attempting to login using fbchat v2.0.0a3 throws an error, see Traceback below. I can login as expected using 2.0.0a2 and 1.9.6…

Someone else has had the same problem, and could also solve by using v2.0.0a2, see https://github.com/carpedm20/fbchat/issues/581

Seems related to the solution to https://github.com/carpedm20/fbchat/issues/413, in particular commit https://github.com/carpedm20/fbchat/commit/079d4093c4f0febf004c6cf8f6972f157833a4f7

Code to reproduce

import fbchat

session = fbchat.Session.login("<username snipped>", "<password snipped>")

Traceback

Traceback (most recent call last):
  File "hello.py", line 4, in <module>
    session = fbchat.Session.login("<username snipped>", "<password snipped>")
  File "/Users/matt/programming/python/patrick2/venv/lib/python3.7/site-packages/fbchat/_session.py", line 290, in login
    raise _exception.NotLoggedIn(error)
fbchat.NotLoggedIn: Password Forgot account?

Environment information

  • Python version 3.7.7
  • fbchat version 2.0.0a3 (installed with pip install fbchat==2.0.0a3)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
TimLChancommented, Sep 12, 2020

The code above is a bit bloated to be committed I reckon. You’re better off just scraping the _js_datr cookie from a new session on messenger.com.

Add it to your session cookies using: requests.utils.add_dict_to_cookiejar(session.cookies, {'_js_datr': js_datr}) or session.cookies.set("_js_datr", js_datr, domain=".messenger.com")

1reaction
madsmtmcommented, Jun 14, 2020

Note to my future self: I managed to get the same error page as you people by inserting an old datr cookie, using that I should be able to improve the error message parsing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction — fbchat 2.0.0a3 documentation - Read the Docs
Welcome, this page will guide you through the basic concepts of using fbchat . The hardest, and most error prone part is logging...
Read more >
Introduction Solution — IDAES v2.0.0a3 Examples
Today we will introduce you to the fundamentals of working with the IDAES process modeling toolset, and we will demonstrate how these tools...
Read more >
pykakasi 2.0.0 - PyPI
pykakasi is a Python Natural Language Processing (NLP) library to transliterate hiragana, katakana and kanji (Japanese text) into rōmaji (Latin/Roman alphabet).
Read more >
JVC Projector Component - #39 by nainokami
I know this is old, but I just went through a couple days trying to get this ... While this is on, the...
Read more >
Installed older version of skype, cannot login
Your password might be 100% correct, but it's no longer possible to login using Skype 7.16 version All Skype versions older than 7.31...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found