purple-discord
purple-discord copied to clipboard
Linux Pidgin discord plugin not receiving messages
Hi all,
Has anyone else had an issue with the Linux version of Pidgin and the Discord plugin having issues receiving messages. Any messages I send work fine and I can see all the channels and online statuses so everything else seems to work fine. Anyone got any ideas of how to fix this?
Pop OS 20.10 Kernel: Linux 5.11.0-7614
Which version/git commit of the plugin are you using?
Can you get a debug log from Help->Debug Window from when messages are coming through but aren't displaying?
It might be that you need to build an updated version of the plugin (to deal with some protocol changes a couple of months ago where they tried to block non-official third parties from receiving messages).
You might also need to verify your account at discord.com if you haven't gone through those steps already?
That is what I am thinking given on ubuntu/Pop OS the repo does not contain the same packages as listed for under Fedora/CentOS/RHEL at https://github.com/EionRobb/purple-discord. Although I get errors compiling even after installing libpurple-dev. I however cannot find the glib and gmp packages listed below that are listed on https://github.com/nmbook/pidgin-libbnet
Ubuntu/DEB-based
libpurple-dev
libglib-dev
libgmp-dev
I assume I am missing something still. Might need to do some more digging tomorrow.
$ make
cc -fPIC -O2 -g -pipe -Wall -std=c99 -DDISCORD_PLUGIN_VERSION='"0.9.2021.06.17.git.659de4f"' -DMARKDOWN_PIDGIN -DENABLE_NLS -DLOCALEDIR="/usr/share/locale" -shared -o libdiscord.so libdiscord.c markdown.c purple2compat/http.c purple2compat/purple-socket.c -Wl,-z,relro pkg-config purple glib-2.0 json-glib-1.0 --libs --cflags
-Ipurple2compat -g -ggdb
Package json-glib-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `json-glib-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'json-glib-1.0' found
libdiscord.c:36:16: fatal error: glib/gi18n-lib.h: No such file or directory
36 | # include <glib/gi18n-lib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from markdown.c:20:
markdown.h:23:10: fatal error: purple.h: No such file or directory
23 | #include <purple.h>
| ^~~~~~~~~~
compilation terminated.
In file included from purple2compat/http.c:22:
purple2compat/http.h:31:10: fatal error: glib.h: No such file or directory
31 | #include <glib.h>
| ^~~~~~~~
compilation terminated.
In file included from purple2compat/purple-socket.c:22:
purple2compat/purple-socket.h:31:10: fatal error: connection.h: No such file or directory
31 | #include "connection.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:108: libdiscord.so] Error 1
Looks like you're missing the libjson-glib-1.0-dev package too
I've rebooted one of my machines and immediately ran into this.
Other still running instances work fine, but after restart messages from other users won't appear.
I do still see mine.
Here is the log excerpt that corresponds in time to a missed message:
(22:01:27) discord: Fetching url https://discord.com/api/v6/channels/714492504673746969/messages/855885006030241803/ack
(22:01:27) discord: With postdata {"token":null}
(22:01:27) util: requesting to fetch a URL
(22:01:27) dnsquery: Performing DNS lookup for discord.com
(22:01:27) dns: DNS child 29953 no longer exists
(22:01:27) dns: Created new DNS child 2225, there are now 1 children.
(22:01:27) dns: Successfully sent DNS request to child 2225
(22:01:27) dns: Got response for 'discord.com'
(22:01:27) dnsquery: IP resolved for discord.com
(22:01:27) proxy: Attempting connection to 162.159.136.232
(22:01:27) proxy: Connecting to discord.com:443 with no proxy
(22:01:27) proxy: Connection in progress
(22:01:27) proxy: Connecting to discord.com:443.
(22:01:27) proxy: Connected to discord.com:443.
(22:01:27) nss: SSL version 3.3 using 128-bit AES-GCM with 128-bit AEAD MAC
Server Auth: 256-bit ECDSA, Key Exchange: 255-bit ECDHE, Compression: NULL
Cipher Suite Name: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
(22:01:27) nss: subject=CN=sni.cloudflaressl.com,O="Cloudflare, Inc.",L=San Francisco,ST=CA,C=US issuer=CN=Cloudflare Inc ECC CA-3,O="Cloudflare, Inc.",C=US
(22:01:27) nss: subject=CN=Cloudflare Inc ECC CA-3,O="Cloudflare, Inc.",C=US issuer=CN=Baltimore CyberTrust Root,OU=CyberTrust,O=Baltimore,C=IE
(22:01:27) nss: subject=CN=Baltimore CyberTrust Root,OU=CyberTrust,O=Baltimore,C=IE issuer=CN=Baltimore CyberTrust Root,OU=CyberTrust,O=Baltimore,C=IE
(22:01:27) certificate/x509/tls_cached: Starting verify for discord.com
(22:01:27) certificate/x509/tls_cached: Checking for cached cert...
(22:01:27) certificate/x509/tls_cached: ...Found cached cert
(22:01:27) nss/x509: Loading certificate from /home/aidaho/.purple/certificates/x509/tls_peers/discord.com
(22:01:27) certificate/x509/tls_cached: Peer cert matched cached
(22:01:27) nss/x509: Exporting certificate to /home/aidaho/.purple/certificates/x509/tls_peers/discord.com
(22:01:27) util: Writing file /home/aidaho/.purple/certificates/x509/tls_peers/discord.com
(22:01:27) nss: Trusting CN=sni.cloudflaressl.com,O="Cloudflare, Inc.",L=San Francisco,ST=CA,C=US
(22:01:27) certificate: Successfully verified certificate for discord.com
(22:01:27) util: request constructed
(22:01:27) util: Response headers: 'HTTP/1.1 200 OK
Date: Sat, 19 Jun 2021 19:01:27 GMT
Content-Type: application/json
Content-Length: 83
Connection: close
set-cookie: __dcfduid=5d10757bfd7f4ea095aa702e039c0091; Expires=Thu, 18-Jun-2026 19:01:27 GMT; Max-Age=157680000; Secure; HttpOnly; Path=/
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-envoy-upstream-service-time: 8
Via: 1.1 google
Alt-Svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400
CF-Cache-Status: DYNAMIC
cf-request-id: 0ac73f4c1900003f0449a9d000000001
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v2?s=oQhguqHYLOwUc4sN9hDL0zzCc%2B%2FFfJt1jjHxMXkSgmlW4yj0LbCsXFN%2FrWpUAv%2F5KxtbT8VI3VmtDBIMbgHhP3S%2FaNs204lKC1D9bw0804%2BrhBS6EoVEJw%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"report_to":"cf-nel","max_age":604800}
X-Content-Type-Options: nosniff
Server: cloudflare
CF-RAY: 661f018cf93c3f04-KBP
'
(22:01:27) util: parsed 83
(22:01:27) discord: Got response: {"token": "WzM1MTg0MzA4NTg5MTkyODA2NCxmYWxzZV0.YM4_Bw.v9UkC-t5aQwCSL08cN9qaMIWY_M"}
(22:01:27) discord: got frame data: {"t":"MESSAGE_ACK","s":58,"op":0,"d":{"version":13538,"message_id":"855884977739923466","channel_id":"714492504673746969"}}
(22:01:27) discord: Unhandled message type 'MESSAGE_ACK'
(22:01:27) discord: got frame data: {"t":"MESSAGE_ACK","s":59,"op":0,"d":{"version":13539,"message_id":"855885006030241803","channel_id":"714492504673746969"}}
(22:01:27) discord: Unhandled message type 'MESSAGE_ACK'
My plugin comes from Debian Backports and has version 0.9.2020.10.14.git.8216905-1~bpo10+1
@aidaho yep your version is from October 2020, you'll need to update or build to something newer than May of 2021
I've compiled master. You're right: it works fine.
Haven't noticed how old the backports binary was.
Discord probably changed something causing these older plugins to fail.
I've compiled master. You're right: it works fine. Haven't noticed how old the backports binary was.
Discord probably changed something causing these older plugins to fail.
I am curious which OS you built this using? On Ubuntu it seems the required packages don't exist. I was able to get one of them installed but I still get notified of warnings when running make. the errors advise that the parameters in the code are deprecated. Example below. After running a make install it advises
"make: convert: No such file or directory
make: *** [Makefile:138: discord16.png] Error 127"
$ make
cc -fPIC -O2 -g -pipe -Wall -std=c99 -DDISCORD_PLUGIN_VERSION='"0.9.2021.06.21.git.659de4f"' -DMARKDOWN_PIDGIN -DENABLE_NLS -DLOCALEDIR="/usr/share/locale" -shared -o libdiscord.so libdiscord.c markdown.c purple2compat/http.c purple2compat/purple-socket.c -Wl,-z,relro pkg-config purple glib-2.0 json-glib-1.0 --libs --cflags
-Ipurple2compat -g -ggdb
In file included from /usr/include/libpurple/media/codec.h:35,
from /usr/include/libpurple/media.h:31,
from /usr/include/libpurple/prpl.h:75,
from /usr/include/libpurple/buddyicon.h:39,
from /usr/include/libpurple/blist.h:110,
from /usr/include/libpurple/status.h:133,
from /usr/include/libpurple/connection.h:151,
from /usr/include/libpurple/account.h:49,
from /usr/include/libpurple/purple.h:48,
from purple_compat.h:19,
from libdiscord.c:50:
/usr/include/libpurple/media/../util.h:1397:13: warning: Deprecated pre-processor symbol, replace with
1397 | G_CONST_RETURN gchar *purple_gai_strerror(gint errnum);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libpurple/prpl.h:75,
from /usr/include/libpurple/buddyicon.h:39,
from /usr/include/libpurple/blist.h:110,
from /usr/include/libpurple/status.h:133,
from /usr/include/libpurple/connection.h:151,
from /usr/include/libpurple/account.h:49,
from /usr/include/libpurple/purple.h:48,
from purple_compat.h:19,
from libdiscord.c:50:
I've compiled on Debian 10.
From what I can tell, you are missing convert
binary
"make: convert: No such file or directory make: *** [Makefile:138: discord16.png] Error 127"
On my system it is provided by a graphicsmagick-imagemagick-compat
package.