Closed Thaodan closed 2 years ago
Interesting. Since you have the environment set up, could you please try running (with debug enabled) a build with eb768b4 included with both glib versions and see if there are any differences in requests bitlbee-discord sends?
I can. Just as a note: I build the bitllbee- discord package I currently use with glib2 2.70 installed, downgrading to 2.68 before or aftter building doesn't seem to make a difference.
Yeah, makes sense. No need to rebuild it the second time, just make sure that commit is included and then you can switch glib versions without a rebuild.
2.68:
[17:29:33] >>> ((null)) discord_ws_connected_cb 254
2.70:
[17:40:21] >>> ((null)) discord_ws_connected_cb 235
After these lines there should be a request body starting with "GET blabla HTTP/1.1", thats the important part
2.68:
[17:41:46] >>> ((null)) discord_ws_connected_cb 254 GET /?encoding=json&v=6 HTTP/1.1 Host: gateway.discord.gg Connection: keep-alive, Upgrade Upgrade: websocket Origin: discordapp.com Pragma: no-cache Cache-Control: no-cache Sec-WebSocket-Version: 13 Sec-WebSocket-Key: foobar
2.70: [17:41:07] >>> ((null)) discord_ws_connected_cb 235 GET HTTP/1.1 Host: gateway.discord.gg Connection: keep-alive, Upgrade Upgrade: websocket Origin: discordapp.com Pragma: no-cache Cache-Control: no-cache Sec-WebSocket-Version: 13 Sec-WebSocket-Key: foobar
Apparently starting with glib 2.69 g_match_info_fetch() now returns an empty string instead of NULL on failed match. https://gitlab.gnome.org/GNOME/glib/-/issues/229
This throws discord_http_gateway_cb() off.
Please try https://github.com/sm00th/bitlbee-discord/commit/607f9887ca85f246e970778e3d40aa5c346365a7 with glib2.70.
Just saw this and tested, that commit fixes it on 2.70 for me.
Just tested, it works flawlessly with glib 2.70 on Arch.
Thanks for the feedback. Going to close this issue now.
Login with glib2 >2.68 is broken. On Arch Linux for example there is glib2 2.70