bitlbee / bitlbee-facebook

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

Unable to log in since Jan 12 [issue was broken IPv6 routing] #166

Closed drvink closed 6 years ago

drvink commented 6 years ago

bitlbee-facebook has worked flawlessly for over a year, up until now, where it just stalls at "Logging in: Fetching contacts". I've tried recreating the account, can log in to Facebook via other methods, and Facebook doesn't think there's anything sketchy about the host from which I was connecting.

With BITLBEE_DEBUG_FACEBOOK=1 in my environment, I see a request for fb_api_req_friendly_name=FetchContactsFullQuery ...more stuff..., and I never appear to get a response--perhaps something changed in the protocol, or maybe the bitlbee-facebook API key has been blocked?

stevesbrain commented 6 years ago

Are you using 2FA?

dequis commented 6 years ago

Try git revert cdc41b66, rebuild and report results.

shymega commented 6 years ago

@stevesbrain I know I'm not OP, but I've just had this issue, and I am also using 2FA.

I've tried @dequis's suggestion, to no avail. It still stalls on 'Fetching contacts'. Occasionally my bitlbee instance times out from Facebook as well. I'm leaning towards the hypothesis that FB have changed something server-side. I note I had a FB Messenger update recently.. it could be that the protocol changed a little. Bah, FB :P

drvink commented 6 years ago

I am using 2FA, and reverting that commit and rebuilding didn't work for me either.

shymega commented 6 years ago

I should also add, on the FB Messenger app, including beta, I have noticed personally a lot more instability, even on non-beta.. not especially sure if FB are mucking around or something. shrugs

dequis commented 6 years ago

I kinda need a page equivalent to this one but for bitlbee-facebook https://github.com/dequis/purple-facebook/wiki/Debugging-Logs

Anyway ignore the purple specific parts of that page and mail a full debug log to the address in that page, sanitize as you wish (or not at all if you don't mind)

stevesbrain commented 6 years ago

@drvink Tried using an app password instead of your regular then? Bypasses 2FA. Having said that, I've had issues (namely with https://github.com/rg3/youtube-dl) where even with an app password, it won't authenticate. I have to turn off 2FA, auth, then turn it back on.

dequis commented 6 years ago

This is post-auth, if you get to fetching the contact list you already have a working access token.

shymega commented 6 years ago

Interesting, its now working for me. I haven't changed anything.. just a heads up. :confused:

dequis commented 6 years ago

The debug log I got didn't clarify a lot - it just showed the sent http request, no response, and I assume it dies with a timeout.

I'm going to guess this is ipv6 related, so try adding an entry to /etc/hosts with this to force it to use ipv4:

31.13.94.19 graph.facebook.com

Or whatever ipv4 resolves for you for that domain. Make a note to remove this entry at some point in the future, no guarantee it will stay with that address forever.

There's also the fact that purple-facebook users (which are way more) never had this issue. Residential ISPs provide ipv6 less often and if they do they probably care more about not breaking routes to facebook.

drvink commented 6 years ago

Wow, good guess. Indeed, it was IPv6--disabling the v6 interface on the machine from which I run bitlbee made it work immediately. I guess this can be closed!