sm00th / bitlbee-discord

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

Failed to switch to websocket mode #190

Closed slackhead closed 5 years ago

slackhead commented 5 years ago

bitlbee.log bitlbee 3.5.1 blitbee-discord 0.4.1

When I identify I get the following:

06:11  @root Password accepted, settings and accounts loaded
06:11     └> Trying to get all accounts connected...
06:11     └> discord - Login error: Failed to switch to websocket mode
06:11     └> discord - Logging in: Signing off..

Any ideas? I don't have any other accounts to test with.

sm00th commented 5 years ago

Hi, the debug log you are providing seems to be cut short. "Failed to switch to websocket mode" in the irc client should be accompanied by a message of the following format "<<< (%s) %s switching failure. buf:\n%s\n" in the debug log.

slackhead commented 5 years ago

I just tried it again and this is the end:

Finishing HTTP request with status: 200 OK [07:41:21] <<< ((null)) discord_http_gateway_cb [200] 35 {"url": "wss://gateway.discord.gg"}

I'm guessing that 'null' is the problem. What should it normall say?

sm00th commented 5 years ago

Is bitlbee-discord built from git? With the current code it can't be the end as the message you are seeing in your irc client is printed out after the debug message I mentioned: https://github.com/sm00th/bitlbee-discord/blob/master/src/discord-websockets.c#L197

This "null" is completely normal at this stage. It is supposed to be the discord username, but this only starts to show up after logging in.

slackhead commented 5 years ago

Okay, just installed from git and now I'm logged in. Thanks.