sm00th / bitlbee-discord

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

Unable to connect to discord: Connection timeout #201

Closed xrogaan closed 4 years ago

xrogaan commented 4 years ago

As of today, bitlbee discord seems unable to reach discord at all:

<root> discord - Login error: Connection timeout
<root> discord - Logging in: Signing off..
<root> discord - Logging in: Reconnecting in 5 seconds..
<root> discord - Login error: Connection timeout
<root> discord - Logging in: Signing off..
<root> discord - Logging in: Reconnecting in 15 seconds..
<root> discord - Login error: Connection timeout
<root> discord - Logging in: Signing off..
<root> discord - Logging in: Reconnecting in 45 seconds..

Not quite sure what it means, maybe a change in API? I am obviously connected to the internet and able to reach discordapp.com, host returns a bunch of ip and all.

xrogaan commented 4 years ago

Discussed this over IRC and provided a log. Discord is timing me out because data isn't processed fast enough. Updating to bitlbee 3.6 doesn't improve anything. Left most server I was on, without improvements.

I usually get high CPU usage when connecting, but no more. The change in behavior didn't occur after I made changes to my configuration or the amount of server I was on, which lead me to believe that something changed on discord's end.

Smell test suggest to me that processing the data might need to be done at a later stage.

remlap commented 4 years ago

I am seeing the same issue. I can connect but very soon after connect drops and won't reconnect.

sm00th commented 4 years ago

Looks like an API change after all. bitlbee-discord is no longer getting GUILD_SYNC replies. Websocket opcode 12 (request sync) is also no longer in discord docs, although I vaguely remember it not being there before.

sm00th commented 4 years ago

The opcode and format are still valid though because it doesn't disconnect right away (it should on invalid opcode or badly formatted request).

sm00th commented 4 years ago

Pushed in a workaround. I am not sure of all effects it will have, but at least it lets you login.

AxelTerizaki commented 4 years ago

Thanks for the quick fix ! :)

sm00th commented 4 years ago

@remlap make sure you logout from bitlbee and restart it after installing updated plugin

remlap commented 4 years ago

@remlap make sure you logout from bitlbee and restart it after installing updated plugin

I quickly deleted my comment after I realised what I did wrong, I had stupidly run make then forgot to actually install! I even restarted bitlbee. I am an idiot!

It seems to be all working well.

namtsui commented 4 years ago

I experienced this timeout issue as of February 4 and will try your fix. Thanks.

xrogaan commented 4 years ago

Login works for me.

Issue introduced: the user lists are now empty.

crazycatdevs commented 4 years ago

Hi there, Just to say that the fix worked for me. I think the issue could be close.

sm00th commented 4 years ago

1b9870a adds support for per-channel sync, so user lists should be there once again.

normen commented 4 years ago

Seeing the same behavior again, can't seem to log in to discord using the plugin.

demlak commented 3 years ago

and again..

23:56 <@root> discord - Login error: Connection timeout
23:56 <@root> discord - Logging in: Signing off..
23:56 <@root> discord - Logging in: Reconnecting in 5 seconds..
23:58 <@root> discord - Login error: Connection timeout
23:58 <@root> discord - Logging in: Signing off..
23:58 <@root> discord - Logging in: Reconnecting in 15 seconds..
00:00 <@root> discord - Login error: Connection timeout
00:00 <@root> discord - Logging in: Signing off..
00:00 <@root> discord - Logging in: Reconnecting in 45 seconds..
00:03 <@root> discord - Login error: Connection timeout
00:03 <@root> discord - Logging in: Signing off..
00:03 <@root> discord - Logging in: Reconnecting in 135 seconds..
00:07 <@root> discord - Login error: Connection timeout
00:07 <@root> discord - Logging in: Signing off..
00:07 <@root> discord - Logging in: Reconnecting in 405 seconds..
sm00th commented 3 years ago

I am currently able to log in normally. But if the issue persists for you please follow the 'Debugging' section from readme and open a new issue with debug information included.

demlak commented 3 years ago

thx.. see: #218