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

Update _session.py 01-06-23 19:01 #665

Open
wants to merge 1 commit into
base: consolidate-events
Choose a base branch
from

Conversation

RyannKim327
Copy link

I used this package, and there's a bug on it. So I try to debug it first, and It's working now. r.text.split('"client_revision":', 1)[1].split(",", 1)[0] ArrayIndexOutOfBoundsException on ('"client_revision":', 1)[1]

I used this package, and there's a bug on it. So I try to debug it first, and It's working now.
r.text.split('"client_revision":', 1)[1].split(",", 1)[0]
ArrayIndexOutOfBoundsException on ('"client_revision":', 1)[1]
@Gorol21
Copy link

Gorol21 commented Jan 6, 2023

Hi, i changed code in my version of fbchat, then still notching changes. My bot can't login.

@RyannKim327
Copy link
Author

I actually opened the _state in the current version I've used, and I saw the almost same code from _state in _session. The error still says about the ArrayIndexOutOfBounceException. Tha't why I try to do some modifications

Hi, i changed code in my version of fbchat, then still notching changes. My bot can't login.

@Gorol21
Copy link

Gorol21 commented Jan 6, 2023

Soo, i have this issue. Can you help me?
Logging in...
Attempt #1 failed, retrying
Traceback (most recent call last):
File "C:\Users\minec\AppData\Local\Programs\Python\Python39\lib\site-packages\fbchat_client.py", line 205, in login
self._state = State.login(
File "C:\Users\minec\AppData\Local\Programs\Python\Python39\lib\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)

@RyannKim327
Copy link
Author

Ohh. Just take some cooldown to your account, It's not error about the code, but error in your facebook account, by logging in. If you open your account, it will says that your account has wrong password even it is correct.

@AlexanderMoreR
Copy link

AlexanderMoreR commented Jun 6, 2023

Buen dia, hablo español espero me entiendan

Ese error se presentan cuando se inicia mucho a la misma cuenta y por que facebook detecta un ingreso inseguro la idea es emulargo como un ingreso de una pagina web o esperar enfrial la cuenta lo ideal es no genere ese error con webhook. utiliza la version 1.9.7

@RyannKim327
Copy link
Author

pero este error se muestra en el primer aviso del programa y dice sobre la identificación de la cuenta

@AlexanderMoreR
Copy link

AlexanderMoreR commented Jun 7, 2023

Hola @RyannKim327

El error "r.text.split('"client_revision":', 1)[1].split(",", 1)[0] ArrayIndexOutOfBoundsException en ('"client_revision":', 1)[1]"

cambiando el revision por un valor 1

def from_session(cls, session):
    # TODO: Automatically set user_id when the cookie changes in the session
    user_id = get_user_id(session)

    r = session.get(_util.prefix_url("/"))

    soup = find_input_fields(r.text)

    fb_dtsg_element = soup.find("input", {"name": "fb_dtsg"})
    if fb_dtsg_element:
        fb_dtsg = fb_dtsg_element["value"]
    else:
        # Fall back to searching with a regex
        fb_dtsg = FB_DTSG_REGEX.search(r.text).group(1)

    revision = 1

se encuntra en el archivo _state.py

me confirmas si ese el error presentando

Solucion para la version de fbchat 1.9.7 la version 2.0.0 son muy inestables

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

Successfully merging this pull request may close these issues.

3 participants