sm00th / bitlbee-discord

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

WS Header Failures #208

Closed tomatosoupcan closed 4 years ago

tomatosoupcan commented 4 years ago

Been getting the following error constantly the past couple of days. Tried upgrading my system, reinstalling the libraries, etc. with no luck.

20:57:26 | <@root> | discord - Error: Failed to read ws header. 20:57:26 | <@root> | discord - Performing soft-reconnect 20:57:41 | <@root> | discord - Error: Failed to do ssl_read while switching to websocket mode: 0 20:57:41 | <@root> | discord - Signing off..

Any ideas?

tomatosoupcan commented 4 years ago

Just based on past issues, here's some output from curl:

tomatosoup in ~ at localhost ➜ curl -L http://discordapp.com/api/gateway {"url": "wss://gateway.discord.gg"}% tomatosoup in ~ at localhost ➜ curl -i -H 'Upgrade: websocket' https://gateway.discord.gg HTTP/2 404 date: Tue, 12 May 2020 02:50:27 GMT content-length: 0 set-cookie: __cfduid=db6a114bf6d828931b04dad447fc06b4a1589251827; expires=Thu, 11-Jun-20 02:50:27 GMT; path=/; domain=.discord.gg; HttpOnly; SameSite=Lax; Secure cf-cache-status: DYNAMIC expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" strict-transport-security: max-age=15552000; includeSubDomains; preload x-content-type-options: nosniff server: cloudflare cf-ray: 5920d5146b328121-ORD cf-request-id: 02a86380c3000081217c9d2200000001

tomatosoupcan commented 4 years ago

Additional log:

23:24:04 | <@root> | discord - Error: Failed to read ws header. 23:24:04 | <@root> | discord - Performing soft-reconnect 23:25:27 | <@root> | discord - Heartbeat timed out, reconnecting... 23:25:27 | <@root> | discord - Performing soft-reconnect

sm00th commented 4 years ago

Sorry, this flew off my radar.

From the logs it looks like you are able to initially connect but then this happens? Very much looks like networking issues. Haven't seen this myself and no other reports of similar behavior. Did you try it on another host? Did you try to see if purple-discord shows similar issues on same host?

tomatosoupcan commented 4 years ago

I did switch hosts to a public server and have not seen it happen there, seems like something on my end.

Thaodan commented 3 years ago

I have it also and I don't see anything wrong on my side. There are just these messages.

sm00th commented 3 years ago

I have it also and I don't see anything wrong on my side. There are just these messages.

They occur normally at a slow rate. I only suggested that this was a connection problem because in original reporter's case it happened more than once a minute.

I saw the rate of these on my side flactuate a bit recently and in one instance I had to manually disconnect and connect back to discord to fix it. But so far it doesn't look like anything extraordinary.