Cannot Connect via Mobile; 3 Dot Endless
Rocket.Chat Version: 0.49.4
I have a Rocket.Chat instance that we just changed hostname from server IP:3000 to https://hanahan.work
However, when attempting to login from a mobile device (using the applications) and typing in the server address https://hanahan.work I get a "Failed to connect to server: abort.abort"
When I use the old insecure way http://hanahan.work:3000 it says "Validating Server" and then "Downloading Files" it downloads 27 of them and then it just stick to the 3 dots loading blue screen forever and doesn't go any further.
Any ideas? Our site URL is set as https://hanahan.work in our General tab of Rocket.Chat admin screen.
@laggedHero can you give it a try to connect the Cordova app to their domain and debug?
@engelgabriel Thank for assigning this to someone. So far this is only effecting Android applications. IOS devices and all browsers appear to be working well. I saw this thread RocketChat/Rocket.Chat#26013 as well.
@dmkjr We had this issue on Android too, for a while. Two things we did to fix it;
- We had "wrong" Site URL set in Admin --> General. Needed to be the URL that the mobile app actually used (we had it set to the internal URL, not the internet accessible one)
- After updating from 0.48.2 to 0.49.0 we had to clear the cache an stored data for Rocket.Chat on the phone before it would connect.
@Jannibal What did you actually set the site URL to? I have ours set at https://hanahan.work
I have removed the application, but I'll also try to clear the cache. We originally had this setup without an SSL.
@Jannibal No luck with clearing the cache. It's weird, it downloads the files and then sometimes gets past the 3 dot screen but then shows that it is disconnected from the server and will not go any further and just locks the screen up.
We were able to resolve the issue. When we ran a test on our SSL cert, we were getting a "B" rating because of some key chain issues. While then IOS application and native browsers allowed us to login to our Rocket Chat server, Android application and Android browsers were blocked. Further, via a browser we were showing an issue with the cert.
A member of our team applied some tweaks and fixes to the cert where it passed as an "A+". This allowed the Android application to function properly.
I'm having the same problem.
- installed the docker rocket.chat
- created a subdomain chat.digitall.it
- secured it with a let's encrypt cert (test gives it an "A")
- configured a nginx proxy to point to https://chat.digitall.it
- browser and desktop apps work, mobile do not.
- upon downloading the iOS source code and running it, the spinner goes on endlessy with the error message:
[WebSocket] did disconnect with error (Optional(Error Domain=WebSocket Code=400 "Invalid HTTP upgrade" UserInfo={NSLocalizedDescription=Invalid HTTP upgrade}))
Socket will send message: {
"id" : "IJLhCD9wHJmNuinjo5QTAEjWyPNgN71m3wwXBozMeNqh1j2nSu",
"method" : "public-settings\/get",
"msg" : "method"
}
everything has been done via Plesk Onyx control panel, so it is a configuration that will become over time more and more common.
@digitall-it I had the same problem with a reverse Proxy. Please add the websocket config to your reverse Proxy. (similar issues existing)
Something like that? Found online..
location / {
proxy_pass http://myurl;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
I only can tell you the apache2 way. But should be similar.
# REQUIRES: a2enmod proxy
# REQUIRES: a2enmod proxy_wstunnel
<Location />
Require all granted
Options -Indexes
</Location>
ProxyPass /websocket ws://localhost:3000/websocket
ProxyPassMatch ^/sockjs/(.*)/websocket ws://localhost:3000/sockjs/$1/websocket
ProxyRequests Off
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
I'm just right there, the nginx proxy is managed by Plesk Onyx, I cannot modify the files directly but can add directives in the panel. As it has a specific section for docker reverse proxy, I'm not really sure if the directives are in the right place.
I'm sorry, but i can't help you with Plesk Onyx. But you could find out the correct placement of the reverse proxy websocket config for nginx in the web. I guess its directly in the "location / {" as the normal reverse proxy config.
I know from other Server Administration tools for Webservers, that the config sets up directly in the vhost.
/etc/nginx/sites-available/YOURROCKETCHATDOMAIN.com
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
// YOUR CODE GOES HERE
}
I hope this helps you.
Thanks for all the suggestions. For reference, I managed to solve it this way (in Plesk Onyx):
- When activating the proxy docker nginx rule generator in the Plesk Onyx panel, it creates a new location directive into a file in your /var/www/vhosts/system/domainname/conf (notice that subdomains are not nested)
- Copy this location directive, you'll recognize it because it contains the http://0.0.0.0 string in a rule, has the port mapping you specified earlier and has a specific proxy_pass command
- Disable the proxy docker nginx rule generator, you will add the rules manually
- Add the configuration in the nginx additional directives section. Test, it should work as before
- Add in the location directive, in the panel, at the end, the following code:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Nginx-Proxy true;
proxy_http_version 1.1;
proxy_redirect off;
- Profit