VictorNine / fbridge

Bridge facebook messenger with any service supported by matterbridge
BSD 3-Clause "New" or "Revised" License
29 stars 5 forks source link

2FA connection fails #9

Open Paullux opened 3 years ago

Paullux commented 3 years ago

you can see my error :

Paullux@dvkbuntu:~/fbridge$ python3 fbridge.py
Logging in paulwoisard...
Please enter your 2FA code --> 677061
Submitting 2FA code.
Attempt #1 failed, retrying
Traceback (most recent call last):
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_client.py", line 205, in login
    self._state = State.login(
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_state.py", line 151, in login
    return cls.from_session(session=session)
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_state.py", line 190, in from_session
    revision = int(r.text.split('"client_revision":', 1)[1].split(",", 1)[0])
IndexError: list index out of range
Please enter your 2FA code --> 677061
Submitting 2FA code.
Saving browser.
Starting Facebook checkup flow.
Verifying login attempt.
Saving device again.
Attempt #2 failed, retrying
Traceback (most recent call last):
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_client.py", line 205, in login
    self._state = State.login(
  File "/home/Paullux/.local/lib/python3.8/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/checkpoint/)
Please enter your 2FA code --> 016232
Submitting 2FA code.
Saving browser.
Starting Facebook checkup flow.
Verifying login attempt.
Saving device again.
Attempt #3 failed, retrying
Traceback (most recent call last):
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_client.py", line 205, in login
    self._state = State.login(
  File "/home/Paullux/.local/lib/python3.8/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/checkpoint/)
Please enter your 2FA code --> 678383
Submitting 2FA code.
Attempt #4 failed, retrying
Traceback (most recent call last):
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_client.py", line 205, in login
    self._state = State.login(
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_state.py", line 151, in login
    return cls.from_session(session=session)
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_state.py", line 190, in from_session
    revision = int(r.text.split('"client_revision":', 1)[1].split(",", 1)[0])
IndexError: list index out of range
Please enter your 2FA code --> 678383
Submitting 2FA code.
Saving browser.
Starting Facebook checkup flow.
Verifying login attempt.
Saving device again.
Traceback (most recent call last):
  File "fbridge.py", line 100, in <module>
    client = FBListener(username, password)
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_client.py", line 103, in __init__
    self.login(email, password, max_tries, user_agent=user_agent)
  File "/home/Paullux/.local/lib/python3.8/site-packages/fbchat/_client.py", line 205, in login
    self._state = State.login(
  File "/home/Paullux/.local/lib/python3.8/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/checkpoint/)
powerjungle commented 3 years ago

Yeah the fbchat module isn't maintained at the moment. You can checkout my fork of this project: https://github.com/powerjungle/fbridge-asyncio You can login using cookies: https://github.com/tulir/fbchat-asyncio#examples