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

error since yesterday #625

Open
N0NameN0 opened this issue Nov 22, 2020 · 7 comments
Open

error since yesterday #625

N0NameN0 opened this issue Nov 22, 2020 · 7 comments

Comments

@N0NameN0
Copy link

Anything change at FB side ?

Traceback (most recent call last):
File "./sendFB.py", line 37, in
session = fbchat.Session.login("XXXXXXX", "XXXXXXXX")
File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 377, in login
return cls._from_session(session=session)
File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 434, in _from_session
define = parse_server_js_define(r.content.decode("utf-8"))
File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 36, in parse_server_js_define
raise _exception.ParseError("Could not find any ServerJSDefine", data=html)
fbchat.ParseError: Could not find any ServerJSDefine. Please report this, along with the data below!

@N0NameN0
Copy link
Author

work again ;)

@N0NameN0
Copy link
Author

the bug is back...
fbchat : 2.0.0a5
python : 3.5.3

on this simple sample code :

import fbchat

# Log the user in
session = fbchat.Session.login("XXXX@XXXX.XXX", "XXXXX")

print("Own id: {}".format(session.user.id))

# Send a message to yourself
session.user.send_text("Hi me!")

# Log the user out
session.logout()

got this error :

# python3 test.py 

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    session = fbchat.Session.login("XXXX@XXXX.XXX", "XXXX")
  File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 377, in login
    return cls._from_session(session=session)
  File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 434, in _from_session
    define = parse_server_js_define(r.content.decode("utf-8"))
  File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 36, in parse_server_js_define
    raise _exception.ParseError("Could not find any ServerJSDefine", data=html)
fbchat.ParseError: Could not find any ServerJSDefine. Please report this, along with the data below!

@N0NameN0 N0NameN0 reopened this Dec 11, 2020
@pniedzwiedzinski
Copy link

+1 Same for me

maraid added a commit to maraid/fbchat that referenced this issue Dec 21, 2020
Facebook changed response format. ServerJSDefine is no longer in it.
@maraid
Copy link

maraid commented Dec 21, 2020

Made a fix for it and a pull request: #630

You'll have to wait until someone takes over the repo for it to get merged. Or pull it yourself.

@N0NameN0
Copy link
Author

Made a fix for it and a pull request: #630

You'll have to wait until someone takes over the repo for it to get merged. Or pull it yourself.

Perfect it works !! Thx !

@Mliron
Copy link

Mliron commented Jan 26, 2023

Made a fix for it and a pull request: #630

You'll have to wait until someone takes over the repo for it to get merged. Or pull it yourself.

Hi, this PR did not do the trick for me. Any ideas on how this problem can be fixed?

veronewra added a commit to veronewra/fbchat that referenced this issue May 23, 2023
@szablewskidex
Copy link

in parse_server_js_define
raise _exception.ParseError("Could not find any ServerJSDefine", data_file=file_name)
fbchat.ParseError: Could not find any ServerJSDefine.
they tell me to report this

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

No branches or pull requests

6 participants