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

Disconnection issue when sending a message #130

Closed
QuentinCG opened this issue May 4, 2017 · 3 comments
Closed

Disconnection issue when sending a message #130

QuentinCG opened this issue May 4, 2017 · 3 comments

Comments

@QuentinCG
Copy link

QuentinCG commented May 4, 2017

Hello,

Sometimes when sending a message, this kind of error happens:

DEBUG:requests.packages.urllib3.connectionpool:https://www.facebook.com:443 "POST /messaging/send/ HTTP/1.1" 200 5186
Error #1357001 when sending message: Veuillez vous connecter pour continuer.
WARNING:client:Error #1357001 when sending message: Veuillez vous connecter pour continuer.

DEBUG:requests.packages.urllib3.connectionpool:https://0-channel-proxy-06-ash2.facebook.com:443 "GET /active_ping?seq=90&cap=0&__rev=2999583&__a=1&partition=-2&__user=100016742531249&channel=p_100016742531249&__req=8y&viewer_uid=100016742531249&sticky=611&ttstamp=658172108100116105568888837958658171506655456553119105782&clientid=6c0bce01&fb_dtsg=AQHldti8XXSO%3AAQG2B7-A5wiN&uid=100016742531249 HTTP/1.1" 400 0
DEBUG:requests.packages.urllib3.connectionpool:https://0-edge-chat.facebook.com:443 "GET /pull?seq=90&__rev=2999583&__a=1&sticky_token=611&__user=100016742531249&__req=8z&sticky_pool=frc3c09_chat-proxy&ttstamp=658172108100116105568888837958658171506655456553119105782&clientid=6c0bce01&fb_dtsg=AQHldti8XXSO%3AAQG2B7-A5wiN&msgs_recv=0 HTTP/1.1" 400 0
Traceback (most recent call last):
File "/home/pi/jarvis/plugins_installed/jarvis-fb-messenger/script/facebook_server.py", line 154, in
jarvis_fb_server.listen()

File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 868, in listen
self.do_one_listen(markAlive)
File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 847, in do_one_listen
content = self._pullMessage(self.sticky, self.pool)
File "/usr/local/lib/python3.4/dist-packages/fbchat/client.py", line 761, in _pullMessage
j = get_json(r.text)
File "/usr/local/lib/python3.4/dist-packages/fbchat/utils.py", line 18, in get_json
return json.loads(re.sub(r"^[^{]*", '', text, 1))
File "/usr/lib/python3.4/json/init.py", line 318, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode
raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

@madsmtm
Copy link
Member

madsmtm commented May 5, 2017

Having this problem too. It's difficult to reproduce though, only happens a few percent of the times

@madsmtm
Copy link
Member

madsmtm commented Sep 19, 2017

This might be related to #180, though I haven't been able to reproduce this in a long time, with multiple different accounts.
Does this still happen for you?

@madsmtm
Copy link
Member

madsmtm commented Jan 9, 2020

The error is now raised as a fbchat.FBchatNotLoggedIn exception, and we'll have to find a way to handle it properly from there, I don't think there's really an easy workaround for this!

@madsmtm madsmtm closed this as completed Jan 9, 2020
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

2 participants