EionRobb / purple-rocketchat

Rocket.Chat Plugin for libpurple
GNU General Public License v3.0
21 stars 2 forks source link

Not working with rocketchat 4.4? #23

Closed cgf1 closed 2 years ago

cgf1 commented 2 years ago

I just upgraded my server to the version that was released yesterday (4.4) and the plugin doesn't seem to be connecting.

An initial attempt to load https://myserver/api/me was not succeeding. I changed that to /api/info but that didn't change anything.

EionRobb commented 2 years ago

Can you get a debug log from Help->Debug Window as you reconnect to the account?

cgf1 commented 2 years ago

Pidgin Debug Log : Sat 29 Jan 2022 08:08:29 PM EST (20:07:15) prefs: /pidgin/debug/height changed, scheduling save. (20:07:16) prefs: /pidgin/debug/height changed, scheduling save. (20:07:21) util: Writing file prefs.xml to directory /home/cgf/.purple (20:07:21) util: Writing file /home/cgf/.purple/prefs.xml (20:07:27) gtkutils: gdk_pixbuf_new_from_file() returned nothing for file : Failed to open file “”: No such file or directory (20:07:30) account: Disconnecting account cgf|chat.realedsolutions.com (0x559388660400) (20:07:30) connection: Disconnecting connection 0x5593888db340 (20:07:30) connection: Destroying connection 0x5593888db340 (20:07:36) util: Writing file accounts.xml to directory /home/cgf/.purple (20:07:36) util: Writing file /home/cgf/.purple/accounts.xml (20:07:48) account: Connecting to account cgf|chat.realedsolutions.com. (20:07:48) connection: Connecting. gc = 0x5593889af5b0 (20:07:48) rocketchat: Fetching url https://chat.realedsolutions.com/api/me (20:07:48) util: requesting to fetch a URL (20:07:48) dnsquery: Performing DNS lookup for chat.realedsolutions.com (20:07:48) dnsquery: Performing DNS lookup for chat.realedsolutions.com (20:07:48) signals: Signal data for chat-conversation-typing not found! (20:07:48) dns: Wait for DNS child 14725 failed: No child processes (20:07:48) dns: Wait for DNS child 14726 failed: No child processes (20:07:48) dns: Wait for DNS child 14727 failed: No child processes (20:07:48) dns: Wait for DNS child 14728 failed: No child processes (20:07:48) dns: Created new DNS child 14751, there are now 1 children. (20:07:48) dns: Successfully sent DNS request to child 14751 (20:07:48) dns: Created new DNS child 14752, there are now 2 children. (20:07:48) dns: Successfully sent DNS request to child 14752 (20:07:48) dns: Got response for 'chat.realedsolutions.com' (20:07:48) dnsquery: IP resolved for chat.realedsolutions.com (20:07:48) proxy: Attempting connection to 104.154.212.174 (20:07:48) proxy: Connecting to chat.realedsolutions.com:443 with no proxy (20:07:48) proxy: Connection in progress (20:07:48) dns: Got response for 'chat.realedsolutions.com' (20:07:48) dnsquery: IP resolved for chat.realedsolutions.com (20:07:48) proxy: Attempting connection to 104.154.212.174 (20:07:48) proxy: Connecting to chat.realedsolutions.com:443 with no proxy (20:07:48) proxy: Connection in progress (20:07:48) proxy: Connecting to chat.realedsolutions.com:443. (20:07:48) proxy: Connected to chat.realedsolutions.com:443. (20:07:48) proxy: Connecting to chat.realedsolutions.com:443. (20:07:48) proxy: Connected to chat.realedsolutions.com:443. (20:07:48) nss: SSL version 3.4 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit TLS 1.3, Key Exchange: 255-bit TLS 1.3, Compression: NULL Cipher Suite Name: TLS_AES_256_GCM_SHA384 (20:07:48) nss: subject=CN=chat.realedsolutions.com issuer=CN=R3,O=Let's Encrypt,C=US (20:07:48) nss: partial certificate chain (20:07:48) certificate/x509/tls_cached: Starting verify for chat.realedsolutions.com (20:07:48) certificate/x509/tls_cached: Checking for cached cert... (20:07:48) certificate/x509/tls_cached: ...Found cached cert (20:07:48) nss/x509: Loading certificate from /home/cgf/.purple/certificates/x509/tls_peers/chat.realedsolutions.com (20:07:48) certificate/x509/tls_cached: Peer cert matched cached (20:07:48) nss/x509: Exporting certificate to /home/cgf/.purple/certificates/x509/tls_peers/chat.realedsolutions.com (20:07:48) util: Writing file /home/cgf/.purple/certificates/x509/tls_peers/chat.realedsolutions.com (20:07:48) nss: Trusting CN=chat.realedsolutions.com (20:07:48) certificate: Successfully verified certificate for chat.realedsolutions.com (20:07:48) nss: SSL version 3.4 using 256-bit AES-GCM with 128-bit AEAD MAC Server Auth: 2048-bit TLS 1.3, Key Exchange: 255-bit TLS 1.3, Compression: NULL Cipher Suite Name: TLS_AES_256_GCM_SHA384 (20:07:48) nss: subject=CN=chat.realedsolutions.com issuer=CN=R3,O=Let's Encrypt,C=US (20:07:48) nss: partial certificate chain (20:07:48) certificate/x509/tls_cached: Starting verify for chat.realedsolutions.com (20:07:48) certificate/x509/tls_cached: Checking for cached cert... (20:07:48) certificate/x509/tls_cached: ...Found cached cert (20:07:48) nss/x509: Loading certificate from /home/cgf/.purple/certificates/x509/tls_peers/chat.realedsolutions.com (20:07:48) certificate/x509/tls_cached: Peer cert matched cached (20:07:48) nss/x509: Exporting certificate to /home/cgf/.purple/certificates/x509/tls_peers/chat.realedsolutions.com (20:07:48) util: Writing file /home/cgf/.purple/certificates/x509/tls_peers/chat.realedsolutions.com (20:07:48) nss: Trusting CN=chat.realedsolutions.com (20:07:48) certificate: Successfully verified certificate for chat.realedsolutions.com (20:07:48) util: request constructed (20:07:48) rocketchat: got frame data: o (20:07:48) util: Response headers: 'HTTP/1.1 200 OK Date: Sun, 30 Jan 2022 01:07:48 GMT Server: Apache/2.4.52 (Debian) X-XSS-Protection: 1 X-Content-Type-Options: nosniff X-Frame-Options: sameorigin Content-Security-Policy: default-src 'self' ; connect-src ; font-src 'self' data:; frame-src ; img-src data: blob:; media-src data:; script-src 'self' 'unsafe-eval' 'sha256-jqxtvDkBbRAl9Hpqv68WdNOieepg8tJSYu1xIy7zT34=' ; style-src 'self' 'unsafe-inline' X-Instance-ID: JrWys5bfnMPr3QC9X Content-Type: text/html; charset=utf-8 Vary: Accept-Encoding Connection: close

' (20:07:54) util: Writing file accounts.xml to directory /home/cgf/.purple (20:07:54) util: Writing file /home/cgf/.purple/accounts.xml

cgf1 commented 2 years ago

Don't know if it helps but I changed it back to /api/info and the logs on the server side say this: n.n.n.n - - [29/Jan/2022:20:47:03 -0500] "GET /api/info HTTP/1.0" 200 32 n.n.n.n - - [29/Jan/2022:20:47:03 -0500] "GET /sockjs/905/pidgin39/websocket HTTP/1.1" 101 -

EionRobb commented 2 years ago

It looks like the websocket behaves a bit differently now. The server is waiting for a "connect" message before sending a "connected" event, but previous servers would send connected straight away

cgf1 commented 2 years ago

Ah, that makes sense.

EionRobb commented 2 years ago

Should be resolved with https://github.com/EionRobb/purple-rocketchat/commit/484e5bf9c7579b681f297fea7a1fa36c91a54baf Can you pull master and try again? :)

cgf1 commented 2 years ago

It works! Thanks for the very quick response.

EionRobb commented 2 years ago

Feel free to open new issues if there's other things not working :)

(From the looks of the debug log, there might be something weird going on with user presence/status updates?)