login fails, but active sessions are created on fb account
See original GitHub issueDescription of the problem
Sorry about posting another login issue, but I can’t seem to login even though the username and password are definitely correct, especially since I can see all 5 active sessions documented when I take a look at my FB profile.
I am not sure what’s causing “home” to not be part of the url after getting /login/save-device/cancel/. Traceback is below:
Code to reproduce
#!/usr/bin/env python3
from fbchat import Client
import getpass
import logging
logging.basicConfig(level=logging.DEBUG)
client = Client("<email>", getpass.getpass(prompt="Password: "))
Traceback
Logging in <email>...
INFO:client:Logging in <email>...
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): m.facebook.com:443
DEBUG:urllib3.connectionpool:https://m.facebook.com:443 "GET / HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://m.facebook.com:443 "POST /login.php?login_attempt=1 HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:https://m.facebook.com:443 "GET /login/save-device/?login_source=login&refsrc=https%3A%2F%2Fwww.facebook.com%2F&_rdr HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://m.facebook.com:443 "GET /login/save-device/cancel/ HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:https://m.facebook.com:443 "GET /?_rdr HTTP/1.1" 200 None
Attempt #1 failed, retrying
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/fbchat/_client.py", line 254, in login
state = State.login(email, password, user_agent=user_agent)
File "/usr/local/lib/python3.7/site-packages/fbchat/_state.py", line 139, in login
"(Failed on url: {})".format(r.url)
fbchat._exception.FBchatUserError: Login failed. Check email/password. (Failed on url: https://m.facebook.com/?_rdr)
ERROR:client:Attempt #1 failed, retrying
And onward, 4 more times.
Environment information
- Python version 3.7
fbchat
version 1.7.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
How to Recover a Facebook Account When You Can't Log In
Check If You're Still Logged In. It sounds silly, but the first thing to do if you find yourself logged out of your...
Read more >I'm worried someone could login to my Facebook and ... - Quora
I'm worried someone could login to my Facebook and it somehow didn't show up in Activity Log in logins and logouts history, neither...
Read more >How to Check If Someone Else Is Accessing Your Facebook ...
You can check if someone else is accessing your account by going to Settings and Privacy > Settings > Security and login >...
Read more >Facebook Keeps Logging Me Out — How to Fix? - Beebom
8 Fixes When Facebook Keeps Logging You Out (2022) · 1. Clear Browser Cookies · 2. Wipe Facebook Cache · 3. Check Active...
Read more >Fix Session Expired issue with Facebook 2022 - YouTube
Fix the Session Expired issue with Facebook App easily by doing the tips as shown in this video. Gain full access to your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As @kapi2289 noted, the suggested fix was a rather temporary solution. I’ve fixed this properly in efc8776e709c960d27598a8443d4d479425c6984, by simply just adding an extra check for whether the URL was
/
.Thanks for the detailed report, and for your patience, I’ve been on holiday for the past few weeks 😉
Coolkit-carl, in _state.py (line 134) add in if ‘or True’ That will solve the problem