Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fbchat._exception.FBchatUserError: Login failed. Check email/password. #7

Closed
aksuited opened this issue Feb 13, 2022 · 18 comments
Closed

Comments

@aksuited
Copy link

Does anyone have a suggestion for me as I have installed all requirements and configured the login info and it is failing to login with verified good credentials I have tried multiple accounts also

python main.py
Logging in facebook@email.com...
Traceback (most recent call last):
File "C:\Users\user\main.py", line 501, in
login_logout()
File "C:\Users\user\main.py", line 57, in login_logout
client = CustomClient(email, password, max_tries=1)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fbchat_client.py", line 103, in init
self.login(email, password, max_tries, user_agent=user_agent)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fbchat_client.py", line 205, in login
self._state = State.login(
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\fbchat_state.py", line 153, in login
raise _exception.FBchatUserError(
fbchat._exception.FBchatUserError: Login failed. Check email/password. (Failed on url: https://m.facebook.com/login.php?login_attempt=1)

@msoffice95
Copy link

Did you get it working?

@SnowbiEz
Copy link

SnowbiEz commented Mar 8, 2022

It isn't working for me either. I got the same issue, code not working. PLS FIX!

@MS-Jahan
Copy link
Owner

MS-Jahan commented Apr 2, 2022

Sorry, as I'm busy with my work.

The fbchat module is not usable at the moment as Facebook changed their login system or has done something with their security system. It was not working the last time I tried.

I had to make some changes to the fbchat version 1, using browser cookies and worked that way. Although it works immediately, it stops working after 2-3 hours and the account gets temporarily blocked.

@MS-Jahan
Copy link
Owner

MS-Jahan commented Apr 2, 2022

Use this branch of my fbchat fork: https://github.com/ms-jahan/fbchat/tree/v1

Download the zip, extract, and place the fbchat folder (marked in the image) in the same directory of your script.
image

If you go to the storage tab in browser developer tools, you'll get the cookies. you can save them in a JSON file (session.json) and then read the file in the script as a cookie (This repo's script already does that, you have to save it as session.json in the same directory).

image

Edited:

The session.json file should look like this.

@sors89
Copy link

sors89 commented May 23, 2022

Use this branch of my fbchat fork: https://github.com/ms-jahan/fbchat/tree/v1

Download the zip, extract and place the fbchat folder (marked in the image) in the same directory of your script. image

If you go to the storage tab in browser developer tools, you'll get the cookies. you can save then in a JSON file (session.json) and then read the file in the script as cookie (This repo's script already does that, you have to save it as session.json in the same directory). image

What does the session.json form look like? I have added the brackets but still not working

@MS-Jahan
Copy link
Owner

MS-Jahan commented May 24, 2022

@Exodius-GG Hi, I've recently checked the fbchat module and it's not working.

session.json is a json file. Something like:

{
"c_user": "<value>",
"datr": "<value>",
....<other_values>...
}

@sors89
Copy link

sors89 commented May 24, 2022

@Exodius-GG Hi, I've recently checked the fbchat module and it's not working.

session.json is a json file. Something like:

{
"c_user": "<value>",
"datr": "<value>",
....<other_values>...
}

I hope there will an be an update from you if the fbchat module gets it working again.

@MS-Jahan
Copy link
Owner

MS-Jahan commented May 29, 2022

Hi Everyone!

I've fixed the issue of the fbchat login module. Anyone know doesn't know, please note that fbchat isn't created by me, nor officially maintained by me. So it's not my responsibility to maintain it, but I used to personally. As I'm getting very busy now-a-days, it's really hard to maintain hobby-ish things.

Okay, just follow the instructions written here. No need to use any session.json file. It should be automatically created after successfully logging in.

EDIT: The instruction in the README.md is also valid or the same thing.

@MS-Jahan
Copy link
Owner

MS-Jahan commented Jun 1, 2022

Hi Everyone!
I've fixed the issue of the fbchat login module. Anyone know doesn't know, please note that fbchat isn't created by me, nor officially maintained by me. So it's not my responsibility to maintain it, but I used to personally. As I'm getting very busy now-a-days, it's really hard to maintain hobby-ish things.
Okay, just follow the instructions written here. No need to use any session.json file. It should be automatically created after successfully logging in.
EDIT: The instruction in the README.md is also valid or the same thing.

Hey MS-JAHAN, Thanks for the update! Have you seen this, https://github.com/telegram-sms/telegram-sms is it possible to make an app like this? I have some old android smartphone which I can use to run them 24/7.

Hey, thanks for your query. But I think the Issues section should only be used for discussing issues related to the particular Github repository.

@sors89
Copy link

sors89 commented Jun 3, 2022

Hi Everyone!

I've fixed the issue of the fbchat login module. Anyone know doesn't know, please note that fbchat isn't created by me, nor officially maintained by me. So it's not my responsibility to maintain it, but I used to personally. As I'm getting very busy now-a-days, it's really hard to maintain hobby-ish things.

Okay, just follow the instructions written here. No need to use any session.json file. It should be automatically created after successfully logging in.

EDIT: The instruction in the README.md is also valid or the same thing.

Hi Everyone!

I've fixed the issue of the fbchat login module. Anyone know doesn't know, please note that fbchat isn't created by me, nor officially maintained by me. So it's not my responsibility to maintain it, but I used to personally. As I'm getting very busy now-a-days, it's really hard to maintain hobby-ish things.

Okay, just follow the instructions written here. No need to use any session.json file. It should be automatically created after successfully logging in.

EDIT: The instruction in the README.md is also valid or the same thing.

Getting blocked by facebook over and over again.

@MS-Jahan
Copy link
Owner

MS-Jahan commented Jun 6, 2022

@Exodius-GG Yeah, same. When I used it 2 years ago, it took almost 3 days before the account gets temporarily blocked. But now it takes only a few hours.

May need to dig deeper, but currently too busy to fix it.

@sors89
Copy link

sors89 commented Jun 28, 2022

@Exodius-GG Yeah, same. When I used it 2 years ago, it took almost 3 days before the account gets temporarily blocked. But now it takes only a few hours.

May need to dig deeper, but currently too busy to fix it.

I was wondering if you still having the login issue. I tried the latest fbchat but still get blocked everytime i run the code

@MS-Jahan
Copy link
Owner

I was wondering if you still having the login issue. I tried the latest fbchat but still get blocked everytime i run the code

The last time I replied here, I tried logging in from the script. I think that's why it looked suspicious and that's why facebook temporarily blocked me every time.

I've been using the script for more than 4 days; 24 hours. Sometimes just manually stopped the script and restarted, 2-3 times in a day. It's working fine. This time I copied cookies from a browser (Kiwi Browser, from Android) and used in on Termux. You can try the same.

@MS-Jahan
Copy link
Owner

MS-Jahan commented Jan 9, 2023

@Exodius-GG Hi, I've recently checked the fbchat module and it's not working.

session.json is a json file. Something like:

{
"c_user": "<value>",
"datr": "<value>",
....<other_values>...
}

Here is an example of a session.json file:
https://github.com/MS-Jahan/Messenger-Message-Logger/blob/master/sample_session.json

@PawiX25
Copy link

PawiX25 commented Jun 1, 2023

I'm missing the "m_page_voice" cookie, i can't login to the logger anyways.

@MS-Jahan
Copy link
Owner

MS-Jahan commented Jun 1, 2023

I'm missing the "m_page_voice" cookie, i can't login to the logger anyways.

Sorry, the "m_page_voice" cookie is optional. Not compulsory.

Edited the sample json file.

@akiraaisha
Copy link

Can someone tell me if this has resolved?

@MS-Jahan
Copy link
Owner

Can someone tell me if this has resolved?

Follow the readme file, this issue, and try it yourself. Eventually, Facebook will soft-block the account now and then, you'll have to keep logging into the account from the browser, change the password and use it again,

I've automated this password-changing step and some months later, that account got blocked and Facebook asked for documents.

The Beeper App supports messenger. You can get the code of how they implemented Facebook Messenger in their app here: https://github.com/mautrix/facebook
If I had enough time, I would look into the code and try to build a new module instead of using fbchat.

The issue is closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants