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

Unable to connect to discord: Connection timeout #201

Closed
xrogaan opened this issue Feb 5, 2020 · 16 comments
Closed

Unable to connect to discord: Connection timeout #201

xrogaan opened this issue Feb 5, 2020 · 16 comments

Comments

@xrogaan
Copy link

xrogaan commented Feb 5, 2020

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
Copy link
Author

xrogaan commented Feb 5, 2020

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
Copy link

remlap commented Feb 5, 2020

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

@sm00th
Copy link
Owner

sm00th commented Feb 5, 2020

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
Copy link
Owner

sm00th commented Feb 5, 2020

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 added a commit that referenced this issue Feb 5, 2020
For whatever reason discord stopped responding to REQUEST_SYNC
opcode(12) so we timeout on login. Temporary ignore the issue and assume
we have completed connections even though we are missing guild info.

I am no longer sure of the full list of effects this will have, we will
surely lose guild presence info.

This is a workaround for #201 and should be reverted once that is
properly fixed.

Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
@sm00th
Copy link
Owner

sm00th commented Feb 5, 2020

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

@AxelTerizaki
Copy link

Thanks for the quick fix ! :)

@sm00th
Copy link
Owner

sm00th commented Feb 5, 2020

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

@remlap
Copy link

remlap commented Feb 5, 2020

@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
Copy link

namtsui commented Feb 5, 2020

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

@xrogaan
Copy link
Author

xrogaan commented Feb 6, 2020

Login works for me.

Issue introduced: the user lists are now empty.

@crazycatdevs
Copy link

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

@sm00th sm00th closed this as completed in 1b9870a Feb 6, 2020
@sm00th
Copy link
Owner

sm00th commented Feb 6, 2020

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

@normen
Copy link

normen commented Aug 1, 2020

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

@demlak
Copy link

demlak commented Feb 8, 2021

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
Copy link
Owner

sm00th commented Feb 9, 2021

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
Copy link

demlak commented Feb 9, 2021

thx.. see: #218

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

No branches or pull requests

8 participants