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

Login error: Null value for $.viewer.message_threads.sync_sequence_id #138

Open
auscompgeek opened this issue Mar 29, 2017 · 48 comments
Open
Labels

Comments

@auscompgeek
Copy link

auscompgeek commented Mar 29, 2017

ADMIN EDIT

This is already fixed in the latest release. This ticket is only open for visibility

Release notes: https://github.com/bitlbee/bitlbee-facebook/releases


Original ticket description

Got an Error: Failed to send message this morning and got disconnected from Facebook, and now I'm getting a Login error: Null value for $.viewer.message_threads.sync_sequence_id every time BitlBee reconnects to Facebook.

@theraspb3rry
Copy link

Yeah, I'm currently getting this issue too.

@exitdown
Copy link

same here. cant login because of it. seems like something has changed.

@auscompgeek
Copy link
Author

I suspect this has something to do with Facebook dropping support for ancient versions of Messenger: https://messengerblog.com/general-messenger/update-on-support-for-older-versions-of-messenger-and-facebook-apps/

@auscompgeek
Copy link
Author

See also: dequis/purple-facebook#306

@jashank
Copy link

jashank commented Mar 29, 2017

dup #130

@exitdown
Copy link

NOT a dup of #130. This message is NOT transient - it is a permanent error. something has changed server side, and this plugin won't work unless a workaround is enacted. Linking a closed bug and calling it a dup because the symptom is superficially the same is not helpful as it creates the impression the bug reports are invalid - there is a genuine issue here and it has been triggered by a serverside change which is why it's appearing in both implementations as per dequis/purple-facebook#306

@jashank
Copy link

jashank commented Mar 29, 2017

@exitdown: I accept that the original issue refers to a transient bug. However, I mildly disagree that bringing up a closed bug is not useful: similar prior issues may still be of relevance and providing some link to with associated information ensures there's more information available now, and there's continuity in the treatment. (I also note that dequis/purple-facebook#179 was brought up similarly.)

@exitdown
Copy link

exitdown commented Mar 29, 2017

@jashank yes - if you had added some context to that effect your point is valid - however by simply posting a "dup" with no context most people would read it as dismissive of the issue - which is why i made it clear in my subsequent post that it was not a dupe of that previously closed bug :) either way,hopefully now its obvious there's an issue here's hoping the protocol modifications are relatively easy so we can all get back to using this excellent software :)

@dequis
Copy link
Member

dequis commented Mar 29, 2017

well, fuck.

@dequis
Copy link
Member

dequis commented Mar 29, 2017

Fix 9390579

I'll prepare a release shortly.

edit nevermind see below

@jashank
Copy link

jashank commented Mar 29, 2017

[INFO] facebook: Parsing JSON: {"succeeded":false,"msgid":6252783076008029414,"errno":1545075,"errStr":"This app version no longer supports messaging. To continue to send and receive messages, please update your app to a newer version or use the mobile web version of Facebook.","isRetryable":false}

@dequis
Copy link
Member

dequis commented Mar 29, 2017

fuck

@dequis
Copy link
Member

dequis commented Mar 29, 2017

At least this issue is something I predicted that could happen, but was hoping it wouldn't. The /send_message2 mqtt topic (that we use to send json messages instead of thrift) is very old.

Bad news is that I'll have to implement the newer, more complex one right now.

Good news is that we'll get stickers.

@exitdown
Copy link

thank you for your efforts dequis!

@theotheredbaron
Copy link

Yes, thanks dequis! Been using the plugin for a while now and really appreciate it :)

@ychromosome
Copy link

I tried the new plugin and now I get "Arguments are invalid"

@theotheredbaron
Copy link

Same here, but I think that's what dequis was saying about having to implement complex stuff

@malinkb
Copy link

malinkb commented Mar 29, 2017

I can confirm this issue as well

Edit:

Maybe this should be opened as new issue?

I installed the latest commit: 201703299390579279
Now I can login again. However, I can only receive messages, not send. When I send I get this in the &bitlbee buffer:

@root | facebook - Logging in: Fetching contacts
@root | facebook - Logging in: Connecting
@root | facebook - Logging in: Logged in
@root | facebook - Error: Failed to send message
@root | facebook - Signing off..
@root | facebook - Reconnecting in 5 seconds..
@root | facebook - Logging in: Fetching contacts
@root | facebook - Logging in: Connecting
@root | facebook - Logging in: Logged in

@dequis
Copy link
Member

dequis commented Mar 29, 2017

@malinkb read up

@dequis
Copy link
Member

dequis commented Mar 29, 2017

Please try latest master.

1629e2f fixes message sending - turned out to be just a boring "set user agent version" thing. The old-style /send_message2 message sending is still used by supported versions of the official app, and for the sake of not breaking more than needed now, I'm not changing it.

93a62d3 fixes invalid arguments errors when fetching channel lists.

edit: nope nevermind not yet

@dequis
Copy link
Member

dequis commented Mar 29, 2017

And af132a8 fixes a last minute bug. You can test it now.

@theotheredbaron
Copy link

Thanks dequis, currently being an idiot and failing to work out how to install it, but that's just me

@dequis
Copy link
Member

dequis commented Mar 29, 2017

Builds should appear in the package repos shortly: https://build.opensuse.org/package/show/home:jgeboski/bitlbee-facebook

edit: done

@thorgrin
Copy link

Thanks for such a fast fix & package!

@malinkb
Copy link

malinkb commented Mar 29, 2017

Works now. Thanks for fast fix :)

@liskin
Copy link

liskin commented Mar 29, 2017

Ping @spwhitton, this may be worth uploading to debian, too.

@gahr
Copy link

gahr commented Mar 29, 2017

@dequis Are you planning tagging a new release soon?

@dequis
Copy link
Member

dequis commented Mar 29, 2017

Yeah I'll prepare the long overdue 1.1.0 release now.

Here's a long-form explanation of what happened here:

As others suggested, https://messengerblog.com/general-messenger/update-on-support-for-older-versions-of-messenger-and-facebook-apps/ is indeed relevant. They deploy to production on tuesdays which is when it broke.

I was aware of this, but, as far as I knew, nothing needed updating, because it says that versions older than 5 will be discontinued but we're compatible up to version 38, mostly. I suspected the /send_message2 method might go away, or that the "MQIsdp" connections would break (the latter are only used by the oldest bitlbee-versions). But neither of those were issues, as they seem to be used by versions newer than 5 (I tested 14 and 38 today)

Versioning in facebook is complicated, which is both good and bad. Good because it allows them to have excellent backwards compatibility (as far as they want to keep it). Bad because it's hard to understand where to draw the line on what a version means.

There were two fixes:

  1. The graphql query hash to get the sequence id. Those hashes represent a textual graphql query stored in the server, and those queries are basically a way to tell the server "pick these fields from this deeply nested structure and return them with this other structure". We don't know what the exact query is, we just know the arguments and the result. Well, we don't exactly know the arguments, as evidenced by those errors some people got today. But they are discoverable with some effort.

    So my best guess is that something in the underlying structure of the facebook graph API changed to stop supporting old clients (likely not directly related), and this means that the field that was accessed by the old hash was no longer there. The newer hash checks a different location, or filters it differently, or who knows what, but manages to access that field successfully. It also has different arguments so I'm only using it for the sync sequence number for now, while thread listing uses the other query, because everything else just works.

  2. The version string in the MQTT CONNECT message. This was a surprise because it was previously empty and just worked, but it's how they chose to stop old versions from sending messages. I think that was the only intended breakage, and who knows, maybe the other issue is a bug that facebook should fix. Heh. Our code also likes to disconnect too easily on almost all errors, which seems to be a successful strategy overall.

Not too bad overall. Next time we won't have the surprise version check since we're sending a version exactly where they expect it. Also, I'm happy with the approach they've taken to deprecate very old versions. This announcement sounds like they are committing to 3 years or so of support for old versions, which sounds great.

EDIT: I should mention, the graphql hash for the first (and most important) fix was found by @EionRobb, go thank him too.

@dequis
Copy link
Member

dequis commented Mar 29, 2017

(keeping this open for visibility)

@jashank
Copy link

jashank commented Mar 29, 2017

You're awesome, @dequis!

@SeanHood
Copy link

Thanks for the quick fix @dequis. I tipped you some btc.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Mar 29, 2017
This fixes especially bitlbee/bitlbee-facebook#138.

Reported by:	cognet


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@437203 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Mar 29, 2017
@dequis
Copy link
Member

dequis commented Mar 29, 2017

https://github.com/bitlbee/bitlbee-facebook/releases/tag/v1.1.0

\o/

@aiobofh
Copy link

aiobofh commented Mar 30, 2017

Hi guys! It would be awesome to get a new debian-package as well... Do you think it's possible? Awesome response time on the patch! :) 👍

@dequis
Copy link
Member

dequis commented Mar 30, 2017

The builds in https://build.opensuse.org/package/show/home:jgeboski/bitlbee-facebook happen automatically a few minutes after each commit.

@aiobofh
Copy link

aiobofh commented Mar 30, 2017

Aha. Sorry - Did not know that one. :) Thanks mate! Great!

@bartenbach
Copy link

I just realized I had a problem and it's already fixed 👍

@thallada
Copy link

thallada commented Apr 3, 2017

Do I have to recreate the facebook account in bitlbee for this fix? I tried updating to 20170402~41382c1~288 while keeping the old config files, but I'm still getting the error when connecting to the facebook account.

@dequis
Copy link
Member

dequis commented Apr 3, 2017

Recreating accounts is not needed. You do need to restart the bitlbee daemon and reconnect your irc client.

@lew1s
Copy link

lew1s commented Apr 5, 2017

I am still having this issue. Can you somebody give me clear suggestion?

@zopieux
Copy link
Contributor

zopieux commented Apr 5, 2017

@lew1s did you

  1. update bitlbee-facebook to latest git revision
  2. restart bitblee daemon
  3. /reconnect your IRC client to the bitlbee server?

If so, please open an issue with a bit more debug info, because this specific issue seems to be fixed for most people on this thread.

@thallada
Copy link

thallada commented Apr 5, 2017

@lew1s The issue was persisting for me too after following the above steps, and even after a complete reboot.

I was using the latest ubuntu 16.04 apt package of bitlbee (3.4.2), but I guess that was too old for this fix. I upgraded to 3.5.1+20170130+master+0-g262a82b-git using the packages from https://wiki.bitlbee.org/Packages. For 16.04, add deb http://code.bitlbee.org/debian/master/xenial/amd64/ ./ to your /etc/apt/sources.list.

@dequis
Copy link
Member

dequis commented Apr 5, 2017

@thallada "was"? does it still not work?

Check that you're using the right bitlbee version with /ctcp root version and check that you're using the right plugin version with the plugins command (available in bitlbee 3.5+)

@thallada
Copy link

thallada commented Apr 5, 2017

@dequis sorry for not being clear. Upgrading to 3.5.1 fixed the issue for me.

@lew1s
Copy link

lew1s commented Apr 6, 2017

I am on windows and dont know where to update bitlbee-facebook. Is there some guide for windoes?

@dequis
Copy link
Member

dequis commented Apr 6, 2017

@lew1s Are you sure you're not using purple-facebook instead? https://github.com/dequis/purple-facebook/wiki/Installing-on-Windows

I mean, bitlbee doesn't really support windows, except through cygwin. If you use cygwin the same installation methods in the README apply.

@JR1994
Copy link

JR1994 commented May 2, 2017

I installed puple-facebook from the repo but I am still getting the error.

@auscompgeek
Copy link
Author

@JR1994 This is bitlbee-facebook, not purple-facebook.

@bitlbee bitlbee locked and limited conversation to collaborators May 2, 2017
@dequis
Copy link
Member

dequis commented May 2, 2017

I'm locking this thread since this is resolved.

If anyone has any issues please open a new issue instead.

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

No branches or pull requests