Channels don't show up after login
Describe the bug
After logging in, none of the channels show up. Tapping the search icon and going into the directory, the general channel appears in the list, but when you go into the channel, the messages don't show up and you can't send anything. However, using Rocket.Chat on the Chrome browser on the same device has no issues.
To Reproduce
The Rocket.Chat server is reversed proxied by Apache. I followed the instruction here
- Login to RocketChat server on the Android app
- Notice that none of the channels appear
- Click on the search icon in the top right, tap on "Directory"
- Select the general channel
- None of the messages appear and can't send messages
Expected behavior
Expected to have the same behavior as using RocketChat in the web browser. (Able to see all joined channels, receive/send messages, etc)
Logs
In /var/log/httpd/ssl_access_log, I noticed that websocket is running in http 400 errors [16/Jul/2019:15:14:21 -0700] "GET /websocket HTTP/1.1" 400 29
Screenshots
Devices and Versions
Your Rocket.Chat.Android version: 3.4.2 (2070) Your Rocket.Chat Server version: 1.2.1
Additional context
Apache ssl.conf file
Listen 443 https
SSLPassPhraseDialog exec:/usr/libexec/httpd-ssl-pass-dialog
SSLSessionCache shmcb:/run/httpd/sslcache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
#SSLRandomSeed startup file:/dev/random 512
#SSLRandomSeed connect file:/dev/random 512
#SSLRandomSeed connect file:/dev/urandom 512
SSLCryptoDevice builtin
#SSLCryptoDevice ubsec
<VirtualHost *:80>
#ServerName is in the format of rocketchat.domain.ca
ServerName <ServerName>
ServerAlias www.<ServerName>
Redirect / https://<ServerName>
</VirtualHost>
<VirtualHost *:443>
ServerName <ServerName>
ServerAlias www.<ServerName>
ServerAdmin <our email>
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile <.cer filepath>
SSLCertificateKeyFile <.key.u filepath>
SSLCACertificateFile <.cert filepath>
<Location />
Order allow,deny
Allow from all
</Location>
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://<ServerName>:8080/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://<ServerName>:8080/$1 [P,L]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://<ServerName>:8080/
ProxyPassReverse / http://<ServerName>:8080/
RewriteRule ^/ - [l,pt]
</VirtualHost>
I have this same issue.
Rocket.Chat.Android version: 3.4.2
Looking at the growing list of bad reviews on Google Play store it seems this is quite widespread.
I had the same problem, but with a nginx reverse proxy. I found a solution here: https://github.com/RocketChat/Rocket.Chat/issues/12786#issuecomment-443485738
But even so this seems to be a problem in the server configuration an appropriate message in the app would help to find the problem. For example "could not connect to websocket"
@henryfok and @sgostelow Could you please let us know if it is happening on our latest app release 3.5.0 (2074)?
Getting the same symptoms in the app (blank channel list). Looks like the update added a status message which says "Connecting" indefinitely. Apache logs also report HTTP 400 for https://
However, the issue might be due to my Squid web caching server as it seems to not support WebSocket connections. I guess the mobile app doesn't have a fail over for when WebSockets aren't avaliable? Accessing the web version on mobile Chrome seems fine. I've started testing with Apache Traffic Server and the results look promising.
Getting the same symptoms in the app (blank channel list). Looks like the update added a status message which says "Connecting" indefinitely. Apache logs also report HTTP 400 for https:///websocket
However, the issue might be due to my Squid web caching server as it seems to not support WebSocket connections. I guess the mobile app doesn't have a fail over for when WebSockets aren't avaliable? Accessing the web version on mobile Chrome seems fine. I've started testing with Apache Traffic Server and the results look promising.
No websocket and a browser will usually fall back to XHR. Android apps will fallback too. But it will be painfully slow on both, and may not even load the channel list. iOS will not connect at all.
Squid will likely play havoc so try disabling it to test.
Chrome/ium Right click, Inspect, Network, F5 to refresh, Look for XHR and WS. Should see a websocket under WS. Click 'websocket' and on the right you can see how it was negotiated.
Test on open.rocket.chat then your own to compare.
Yeah, when I use Apache Traffic Server instead of Squid, WebSocket connections are getting upgraded properly (HTTP 101). I can see WebSocket messages sent in the Chrome network tab.
@henryfok and @sgostelow Could you please let us know if it is happening on our latest app release
3.5.0 (2074)?
I've upgraded to 3.5.0 (2074) by accepting beta versions on Google Play and all is now working fine. Thank you!
@sgostelow Thanks for enrolling in the beta channel! The 3.5.0 (2074) was released to production channel (last week to be more precise) as well.
I am going to close this issue as it looks like the issue is resolved for @sgostelow and I have found a solution. Let me know if you want any further information.