fbchat-dev / fbchat

Facebook Chat (Messenger) for Python
https://fbchat.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.19k stars 412 forks source link

error on listen #167

Closed JarbasAI closed 7 years ago

JarbasAI commented 7 years ago

this version upgrade seems rushed...

Hello works, Héllo gives this error


  File "/usr/local/lib/python2.7/dist-packages/fbchat/client.py", line 1340, in listen
    while self.listening and self.doOneListen(markAlive):
  File "/usr/local/lib/python2.7/dist-packages/fbchat/client.py", line 1317, in doOneListen
    return self.onListenError(exception=e)
  File "/usr/local/lib/python2.7/dist-packages/fbchat/client.py", line 1383, in onListenError
    raise exception
Exception: Error while parsing JSON: 'for (;;); {"t":"msg","seq":8,"u":100014741746063,"ms":[{"type":"deltaflow","sequencer":"24768","fbid":"100014741746063"},{"ofd_ts":1498428990162,"delta":{"attachments":[],"body":"H\xc3\xa9lio!","irisSeqId":"24768","messageMetadata":{"actorFbId":"1408531475","messageId":"mid.$cAABa9izTDZxjEpkpyFc4VPgzckzE","offlineThreadingId":"6284866704987278532","tags":["source:chat:orca"],"threadKey":{"otherUserFbId":"1408531475"},"timestamp":"1498428989896"},"class":"NewMessage"},"type":"delta","iseq":24768,"queue":100014741746063}]}'
madsmtm commented 7 years ago

Fixed it in v. 1.0.2, sorry about the issues, but I haven't set tests for the listen functions in a proper way yet