dequis/purple-facebook

ERROR_QUEUE_UNDERFLOW

Amarok73 opened this issue Β· 75 comments

Hello,

Recently, since about three days, trying to login to one of my FB accounts I am receiving "ERROR_QUEUE_UNDERFLOW". Two other accounts that I've created for this investigation works correctly.
The same effect is on two different computers but only on Windows version, on Linux it logs in without problem.

Happens to me on debian buster. Not sure on how I can help. Nothing seems relevant in logs.

(21:14:57) certificate: Successfully verified certificate for graph.facebook.com
(21:14:57) http: Request 0x5630311dea90 performed successfully.
(21:14:58) connection: Connection error on 0x56303059bf00 (reason: 0 description: ERROR_QUEUE_UNDERFLOW)
(21:14:58) account: Disconnecting account XXX (0x56303012ab40)
(21:14:58) connection: Disconnecting connection 0x56303059bf00
(21:14:58) connection: Destroying connection 0x56303059bf00

I found it in the debug window, but nothing that could give a hint of such issue.

(08:15:14) proxy: Connected to scontent.xx.fbcdn.net:443.
(08:15:14) proxy: Connected to scontent.xx.fbcdn.net:443.
(08:15:14) proxy: Using CONNECT tunneling for scontent.xx.fbcdn.net:443
(08:15:14) connection: Connection error on 0544CAA8 (reason: 0 description: ERROR_QUEUE_UNDERFLOW)
(08:15:14) proxy: Connected to scontent.xx.fbcdn.net:443.
(08:15:14) proxy: Using CONNECT tunneling for scontent.xx.fbcdn.net:443

This happens also when I am not connecting through proxy.

Same problem here for my facebook account from three PC's. One of them, my work PC, on an entirely different network.
The facebook account works fine from Miranda which I'm using in the meantime but I'd rather return to Pidgin!

purple-debug.log

I have the same problem since today :(
DΓ©connexion de xxx.xxx
ERROR_QUEUE_UNDERFLOW

as it works with a new account created for the test, i think something has been changed on my account but i don't know how to see what has changed

I hope we can solve the problem

Jeremyp3

Same issue here, other pidgin accounts (e.g. google hangouts) works OK, only facebook has a problem

ijula commented

Same problem here, started today.

I just spoke with someone who still works purple-facebook. I asked him to give me the version of the module he uses. it is using a january 2019 version. i am attaching the .deb for 64 bit. if you don't want to install the .deb, just unzip it with dpkg -x to get the .so. with this version, at my place purple facebook is working again ... maybe it's just a matter of time ...

I tried to go back to the git repository but to no avail

Is there chance for the compiled Windows version?

jeremyp3, could you put up a link to that .deb?

Holy smokes, it does. Thank you for the hax.

does this libfacebook.so have anything to do with the one in /usr/lib/purple-2/ ? That one is much larger...

It also happens to me with that last version

Could someone explain to me step by step how I do?
I can't figure out how to decompress the file

You open it with a zip tool, locate libfacebook.so and copy it into your /home/.purple/plugins folder.

Like @Jeronimo17 I am using the latest release, suggested as a workaround by @jeremyp3, and I am getting the error with that version, so that doesn't seem to be a solution.

I am using Windows version of Pidgin and i get this "ERROR_QUEUE_UNDERFLOW" since three days...

It's just one account, other works fine.

Please help if there is anything that i can do to make this work again.

guys, if you just want to say "not working for me too", instead of putting a message, please use the πŸ‘ reaction on 1st message.
else, useful messages might be lost in the "me too" sea.

I already have "purple-facebook_20190113-0.9.6-0250907-166_amd64.deb" from the @jeremyp3 's link (above) installed in my system for some time. I reinstalled it and there is no difference with "error_queue_underflow". So I can't confirm such solution. The problem persists.

The first message said :

but only on Windows version, on Linux it logs in without problem

Since this morning, I have this ERROR_QUEUE_UNDERFLOW also on the linux version (ubuntu 20.04). It worked yesterday.

It seems to be similar issue as here: bitlbee/bitlbee-facebook#208

@brejcham, thanks very much! Applying the same fix as to the bitlbee plugin (just bumping the FB plugin version in the User-Agent string) works, I can confirm.

@rrthomas, noob here, how do i make the change? windows version

@usermyname12, I edited the source code and rebuilt the plugin, but the simplest way for this one-off fix would be to locate the Facebook plugin .dll file in your plugins directory, load it into a hex editor, search for FBAV/192.0.0.31.101 and change the 192 to 537, then save the plugin and restart Pidgin.

I'm sorry, I can't give more detail than this. Good luck, and do try the Pidgin forums if you get stuck.

Thanks, it was good enough. It worked.

Make sure you are starting from the latest version of the plugin when following the above instructions or you won't find that string exactly like that. You'll be able to find it by searching simply for FBAV but with a different following version number.

Tested and works with latest version of pidgin and purple-facebook.

@usermyname12, I edited the source code and rebuilt the plugin, but the simplest way for this one-off fix would be to locate the Facebook plugin .dll file in your plugins directory, load it into a hex editor, search for FBAV/192.0.0.31.101 and change the 192 to 537, then save the plugin and restart Pidgin.

I'm sorry, I can't give more detail than this. Good luck, and do try the Pidgin forums if you get stuck.

@smartynko why did you link this gloomy site which sucks github content, as this exact answer is just three comments before here? :)

So what is the solution for Linux users? I'm not that fond to edit source code and then compile it myself.

@smartynko why did you link this gloomy site which sucks github content, as this exact answer is just three comments before here? :)

Sorry for that. Somehow I skipped the post by rrthomas and found that "sucked up" version on some other site.
Anyway, the solution works, no matter the source site. Credit still goes to the same person :)

I merged that, but I strongly suspect builds are broken nowadays. I'll check it out later.

Not working for me too. Debian 'Buster' 10.7 Pidgin Pidgin 2.13.0 (libpurple 2.13.0)

solbu commented

I merged that, but I strongly suspect builds are broken nowadays. I'll check it out later.

As a Mageia packager I just tested this, and I also confirm that it works.

self-edited lib for windows (using manipulation shown in #498 (comment) )
help yourself: https://fichiers.albirew.fr/informatique/libfacebook.dll (CRC: 564A94E8)
Will stay here until next or fixed windows release

There might be more to this protocol change than just the version because now it explodes with
':1: Parse error: unexpected identifier `taNewMessage', expected value'
whenever you receive a message. When it auto-reconnects it is able to display the message however.

@targetbsp Having the same issue that appears randomly. I am not sure what can be causing it. Sometimes it works for hours, sometimes it can't go one minute without disconnecting with the message mentioned.

is there also a new build for linux, ubuntu? i'm not into compiling myself, too

There might be more to this protocol change than just the version because now it explodes with
':1: Parse error: unexpected identifier `taNewMessage', expected value'
whenever you receive a message. When it auto-reconnects it is able to display the message however.

So what's the verdict? Does changing the version help?

It's a definite improvement. You go from not being able to connect at all to it working fine for some messages and dropping for others but then reconnecting and showing them.

So it's gone from completely unusable to an intermittent fault you can probably handle if you're patient.

Personally, I've switched back to Miranda again until it's fixed properly.

Linux:

  1. Hex edit /usr/lib/purple-2/libfacebook.so (e.g. use okteta editor)
  2. Search for 192.0.0.31.101
  3. Change to 537.0.0.31.101
  4. Save
  5. Restart Pidgin

So what is the solution for Linux users? I'm not that fond to edit source code and then compile it myself.

Hex editing worked for me on Linux too. But sadly, while this error goes away, I'm getting an unknown HTTP error instead.

ionl commented

on archlinux with GHex, it's ok. I have my contact list. Thank you @nekromoff

@nekromoff Awesome, this works on my LMDE Debbie. (y) Thank you very much!

it works for me too, on ubuntu :)

Vim also works ;) β€” Thanks, @nekromoff.

If any of you wonder what the change does, it just bumps some version string, so it should be quite a safe change.

Works for me too. Thanks, @nekromoff.
Note that the file you need to edit might be /home/YOURUSERNAME/.purple/plugins/libfacebook.so and that the searching needs to be done in "char" mode in okteta.

Can we expect a new release with this fix at some point?

Worked on ubuntu 20.04, Edited with VIM.

Thank u @nekromoff

What to do to pop up notifications when someone texting me or becomes active?

on Linux, needed to change the permission of the libfacebook.so file to make it writable with: sudo chmod a+w libfacebook.so

@sanyooh I'd recommend changing it back after you're done editing.
In general, If you want files to be user-writable then put them in ~/.purple/plugins/ ; otherwise edit them as root.

Could anyone help with the editing under Windows? I’ve tried HxD (https://mh-nexus.de/en/hxd/) with various search types, to no avail :( (the app can’t find the string 192.0.0.31.101).

That suggest you don't have the latest version of the plugin. In which case the string will differ. Download the latest version of the plugin first. https://dequis.org/libfacebook.dll

@targetbsp Thank You so so much, it works! I’ve thought that I used the newest version (from https://github.com/dequis/purple-facebook/wiki/Installing-on-Windows ) , it seems I was wrong. Could You tell what that hex-change into the plugin stand for?

My understanding is we're increasing the version of the facebook client we are claiming to be (or claiming to be emulating, or claiming to be compatible with, or something like that anyway) since the older version is no longer supported by facebook.

@targetbsp Do You know what does the change mean (192.0.0.31.101 into 537.0.0.31.101) in a non-technical way?

192.0.0.31.101 is a version number
537.0.0.31.101 is a newer version number

So it's like Pidgin is saying 'I'm compatible with facebook messenger version 192'. And facebook is saying 'we don't support that version anymore - it's too old'. So now Pidgin is saying 'I'm compatible with version 537'. And facebook is going 'alright then'.

@targetbsp Oh, thank You very much, I’ve thought that maybe it has something to do with IP addresses! :) I missed that it has too many numbers, probably I confused it with port numbers added at the end. Thank You!

Yeah the 192 is a weird co-incidence there that would probably cause anyone seeing it at a glance to think the same. Since local IP's begin with that so it's the IP range people will be most familiar with.

I edited file libfacebook.so at /usr/lib/purple-2/ as mentioned above. But the Facebook protocol option from the dropdown menu disappeared.
image

You used a hex editor right? A text editor would destroy the file on save.

You used a hex editor right? A text editor would destroy the file on save.

Thank you! I used VSCode. At now with Okteta it works.

Just as @wsfsbvchr I'm getting "Unknown HTTP error" after applying this 192->537 fix. Running Pidgin 2.14.1 (libpurple 2.14.1) on Linux Manjaro 20.2.1. Pidgin connects for a short while (a couple of seconds), then I get disconnected. So I manually click "Reconnect" and the issue repeats. But when I send a message during that short "connected" period, the messages are delivered properly.

e3rd commented

I confirm the same as @wsfsbvchr . The fix worked for me till today, now it ends up with "Unknown HTTP error"

The 192/537 fix worked for me on Manjaro Linux (20.2.1) with pidgin 2.15.1-3 and purple-facebook 0.9.6-2.
Logged in and posted to have pidgin open up group chats.

Stilll present purple-facebook 0.9.6-2 in Archlinux, the sudo sed -i -e 's/192\.0\.0\.31\.101/537\.0\.0\.31\.101/' /usr/lib/purple-2/libfacebook.so fixed it for me. For anyone using Arch, I installed the version purple-facebook-git from AUR, also works fine.
Could the version be bumped up with a new release so that package distributors could repackage?

Noob with hex editing here, how do I find FBAV in the hex file? I'm guessing the rest should be straightforward but this part has me stumped, especially since V isn't a hex value

A hex editor will show you the ascii (where it can be represented) alongside the hex. And you want to search the ascii. The reason to use a hex editor is because it can save the bits it can't show in ascii back unchanged and so not break the file - unlike a text editor. You're not expected to actually modify the hex values.

IT WORKED!! OH MY GOD I EDITED HEX FOR THE FIRST TIME SUCCESSFULLY.
Thank you targetbsp :)

I have applied the fix to the newest available dll file.
If someone don't want to do this manually, the attached file can be used.

libfacebook.zip

b2cbd commented

I've updated the dll using @ChristianGalla build. Still, it logs out every few minutes!

connection: Connection error on 3724...... (reason: 0 description: :1: Parse error: unexpected identifier `taNewMessage', expected value)

Will this be fixed at some point? Stopped using pidgin when this issue surfaced

Will this be fixed at some point? Stopped using pidgin when this issue surfaced

I ended up moving to Miranda. It takes a lot of configuring. But it works!

Will this be fixed at some point? Stopped using pidgin when this issue surfaced

I ended up moving to Miranda. It takes a lot of configuring. But it works!

no linux support :(

Will this be fixed at some point? Stopped using pidgin when this issue surfaced

I ended up moving to Miranda. It takes a lot of configuring. But it works!

no linux support :(

i don't use miranda, but i did see they have a page in their wiki about using it under Linux with WINE:
https://wiki.miranda-ng.org/index.php?title=Miranda_under_Wine
I rely too much on the gnome extension https://github.com/muffinmad/pidgin-im-gnome-shell-extension to use miranda, but perhaps you will have luck with those instructions.

hello, 64 bit https://ftp.gwdg.de/pub/opensuse/repositories/home:/jgeboski/Debian_10/amd64/purple-facebook_20190113-0.9.6-0250907-166_amd64.deb https://ftp.gwdg.de/pub/opensuse/repositories/home if you install the deb package, don't forget to delete your file in ~ / .purple / plugins I recommend downloading the deb package and decompressing it with dpkg -x to recover the .so that we can put in our pidgin ~ / .purple / plugins folder with this file, it works Jeremyp3

Thanks alot, this solved the issue on my box. I allways have problems with the apt package for bitlbee-facebook but thats history now ;)

For other users that googling the issue and ends up here. It's the same url but a newer deb file (above urls is dead):
purple-facebook_20210215e0d773222_amd64.deb

c2tz commented

I have applied the fix to the newest available dll file. If someone don't want to do this manually, the attached file can be used.

libfacebook.zip

thx solve my issue for me with the version 2.14.12