sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
291 stars 27 forks source link

Periodic connection timeout #205

Open KeepBotting opened 4 years ago

KeepBotting commented 4 years ago

Recently I have begun experiencing connection issues, they look like this in the control channel:

20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:15:02 | <@root> | discord - Login error: Failed to get backlog (403).
20:16:57 | <@root> | discord - Login error: Connection timeout
20:16:57 | <@root> | discord - Logging in: Signing off..
20:16:57 | <@root> | discord - Logging in: Reconnecting in 5 seconds..
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:17:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:02 | <@root> | discord - Login error: Connection timeout
20:19:02 | <@root> | discord - Logging in: Signing off..
20:19:02 | <@root> | discord - Logging in: Reconnecting in 15 seconds..
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:19:22 | <@root> | discord - Login error: Failed to get backlog (403).
20:21:17 | <@root> | discord - Login error: Connection timeout
20:21:17 | <@root> | discord - Logging in: Signing off..
20:21:17 | <@root> | discord - Logging in: Reconnecting in 45 seconds..
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).
20:22:07 | <@root> | discord - Login error: Failed to get backlog (403).

And so on, until the max timeout is reached (900 seconds)

Messages can be sent and received during the 3-4 minutes it stays connected.

I have tried deleting and re-creating my account with bitlbee-discord, and have set my token.

The 403 errors are normal I believe, caused by trying to fetch backlog from channels I can't access.

I have no issues when using the web app.

Anecdotally, this happened after I upgraded OpenWrt on my router, and leased a new dynamic IPv4 from my ISP. Could this be related?

I will attempt the debugging steps listed in the README and update this issue.

Thanks!

sm00th commented 4 years ago

This sounds a lot like #201, make sure you have the latest commits when testing.