bitlbee / bitlbee-facebook

Facebook protocol plugin for BitlBee
GNU General Public License v2.0
281 stars 43 forks source link

Error: <data>:1:728: Parse error: unexpected character `{', expected string constant #90

Open somasis opened 8 years ago

somasis commented 8 years ago

Upon posting a message containing a gif (I could reproduce it with GIF Keyboard messages), bitlbee-facebook (using latest git, 609ca2d52d468863c99ff3539917f2049ea3df44) will disconnect from the server without displaying the message containing it.

<@root> facebook - Error: <data>:1:728: Parse error: unexpected character `{', expected string constant
dequis commented 8 years ago

Just to be sure, please try:

account facebook off
account facebook set -del token
account facebook on
somasis commented 8 years ago

Reproduced the issue again after doing that.

dgw commented 8 years ago

Upon you posting a GIF, or one of your contacts in a private or group chat?

somasis commented 8 years ago

In a group chat, I could do it with both me posting one to the group chat from the web interface, and also from a contact posting one.

dgw commented 8 years ago

That's interesting. Yesterday one of my friends sent a couple GIFs to one of our group chats and all was fine. Viewing the conversation on messenger.com shows that they were both posted with GIF Keyboard as well. Strange.

My installation's version info:

~$ bitlbee -V
BitlBee 3.4.2
API version 030402
--------
~/bitlbee-facebook$ git show HEAD
commit 609ca2d52d468863c99ff3539917f2049ea3df44

(if bitlbee-facebook has a command that provides more useful version info than a commit, let me know)

auscompgeek commented 7 years ago

A friend of mine shared a Spotify attachment to one of my group chats when this happened. Perhaps it has something to do with sharing from other Android apps?

anlag commented 7 years ago

I believe I'm experiencing this same issue. Just today I've twice been dumped off bitlbee-facebook after others have posted certain gifs in a group chat. The error in &bitlbee is this:

13:55:16 <@root> facebook - Error: :1:761: Parse error: unexpected character `{', expected string constant 13:55:16 <@root> facebook - Signing off..

It promptly reconnects and things work until the next time someone posts an offending gif. It's worth noting that not all gifs trigger this crash; both times today that it's broken the gifs have been posted using "GIPHY". In between those two occasions, someone posted a couple of gifs with "Tenor GIF Keyboard", and that simply displayed the URL in bitlbee as normal without any crash behaviour.

Not sure if this will work or be meaningful, but these two are the gifs that caused my crashes today:

https://scontent.xx.fbcdn.net/v/t34.0-12/17125330_10208762770534715_746240657_n.gif?_nc_ad=z-m&oh=f9a9d54bf6c8c873f4e6cdb5b71a545d&oe=58BBCE15 https://scontent.xx.fbcdn.net/v/t34.0-0/p280x280/17125128_10208763574834822_1573719375_n.gif?_nc_ad=z-m&oh=28b029db96e4d97802953b8f0f6cc5a9&oe=58BBBB27

However since the issue, on a very first limited inspection, seems more related to the app/plugin used to post the gif, than with the gif itself, that may not help much.

Lastly, when the first crash happened I was on commit #ece0715 from November 21 2016. I updated to #3e8dd70 on the off chance it might have been resolved, but seeing the second crash I suppose that is not the case.

$ ~/apps/bitlbee/sbin/bitlbee -V BitlBee 3.4.2 API version 030402

If I can contribute with anything else to help with this, please let me know.

EDIT March 6: Over the weekend I've had several more crashes with the same error. Each time I can trace it back to a GIPHY animation in one of my group chats. If any other gif service causes this problem, I haven't seen it yet.

anlag commented 7 years ago

This is still a rather big inconvenience for me, since I'm in a few rather big, game-related chats where people are occasionally inclined to post a lot of gifs. I'm not sure if it's only GIPHY ones that cause bitlbee to crash but those are the most common anyway, so I get dumped out a lot. Even with relatively fast reconnects I can't be sure I don't miss messages while reconnecting, so I need to go back in the web UI to check, defeating a lot of the purpose in using bitlbee.

Might there be some workaround? For example, a way to filter out messages based on URL by regex, or something like that? I'd be happy to filter out all gifs from bitlbee, it's not like I can see them there anyway. Any ideas appreciated.