sm00th / bitlbee-discord

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

Failed to Read Data #71

Open tecknojock opened 7 years ago

tecknojock commented 7 years ago

Not sure why, but I keep getting this issue multiple times a day. Any way I can debug it?

[10:00:32] [06.02.17] discord - Error: Failed to read data. [10:00:32] [06.02.17] discord - Signing off.. [10:00:32] [06.02.17] discord - Reconnecting in 5 seconds.. [10:00:41] [06.02.17] discord - Logging in: Logged in [10:00:41] [06.02.17] discord - Error: Failed to read data. [10:00:41] [06.02.17] discord - Signing off.. [10:00:41] [06.02.17] discord - Reconnecting in 5 seconds.. [10:00:49] [06.02.17] discord - Logging in: Logged in [10:00:49] [06.02.17] discord - Error: Failed to read data. [10:00:49] [06.02.17] discord - Signing off.. [10:00:49] [06.02.17] discord - Reconnecting in 5 seconds.. [10:00:57] [06.02.17] discord - Logging in: Logged in [10:00:57] [06.02.17] discord - Error: Failed to read data. [10:00:57] [06.02.17] discord - Signing off.. [10:00:57] [06.02.17] discord - Reconnecting in 5 seconds.. [10:01:06] [06.02.17] discord - Logging in: Logged in [10:01:06] [06.02.17] discord - Error: Failed to read data. [10:01:06] [06.02.17] discord - Signing off.. [10:01:06] [06.02.17] discord - Reconnecting in 5 seconds.. [10:01:50] [06.02.17] discord - Logging in: Logged in

sm00th commented 7 years ago

I see them occasionally, but not like 20 in a row. There isn't much to debug though. These errors mean that bitlbee-discord failed to get data from websocket connection, so it is most likely to be caused by network issues other on your or discord's side.

Linkandzelda commented 7 years ago

Just thought I would add to this and give some kind of idea for how often I run into this error also. It's daily with sometimes 5+ times a day since August, the date I started using this plugin.

Here's a (slightly out of order) log of chat messages that it spits out when the issue happens.

http://pastebin.com/v9TMcaKm

I think there is something going on somewhere to cause this, and whether its my server or this plugin or bitlbee or discord servers I have no clue.

sm00th commented 7 years ago

I have an idea on where do occasional disconnects come from. There is a not yet implemented in bitlbee-discord feature when discord politely asks the client to do a silent(not visible to user) reconnect to change servers and, if the client does not comply just boots it out. I am seeing those myself and do plan to implement this occasionally. But multiple disconnects in a row strongly suggest a network issue.

Sophira commented 7 years ago

I also get these errors frequently. They tend to be mixed with "Remote host is closing websocket connection" errors.

I'm running Bitlbee on a Linode in their main datacenter in Dallas, so it's very unlikely to be their end.

I'll get some logs when I can.

CandyAngel commented 7 years ago

I get this issue (10s of disconnects a day), but another user on the same system (bitlbee instance hosted on Linode), never gets these, even when they are on the same Discord servers. Anything we can do to help isolate the issue?

Sophira commented 7 years ago

@CandyAngel Thank you for offering to help! I'm not a dev here, but my suggestion would be to create a new throwaway account on Discord with a password known to both of you which is only to be used by the two of you for the purpose of debugging this issue (so don't put any personal details on it!), join some servers/channels with it, then take turns connecting to the account with your bitlbee-discord instances and leaving it for a day or so (only one person connected at a time, though, just in case that affects anything).

If you both start getting errors or not getting errors when using that account, then that would suggest a Discord account setting or other server-side issue. If you keep getting errors but the other person doesn't, then that would suggest a client-side issue. Either way, there's more information to work on regarding what the issue actually is.

sm00th commented 6 years ago

While the cause of this error popping up so often for some people is still unknown I've added soft-reconnect support that greatly reduces the annoyance of these reconnects (it will no longer re-fetch all of the server info and re-add all users). Please try it out. (for more info see #128)