# Mobile Apps cannot connect

**URL:** <https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628>\
**Category:** Community Support\
**Created:** [July 19, 2018, 12:56pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628 "2018-07-19T12:56:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thisfro](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@thisfro](https://forums.rocket.chat/u/thisfro)\
**Post date:** [July 19, 2018, 12:56pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/1 "2018-07-19T12:56:15Z")

</div>

I have been searching for a while and found some posts that had a similar problem, but nothing helped to fix my problem.

My server is running on [https://chat.thisfro.ch](https://chat.thisfro.ch) (Let’s Encrypt, Apache reverse proxy). Desktop apps and server work perfectly. Android app can load messages, but not send. There’s a “Connecting in …” countdown, which keeps getting higher. iOS won’t connect at all.

 ![Screenshot_20180719-143844](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/1X/7c15aaf744ba84a88355d45325e50755a8f07a6d.png)

Am I missing some configuration?

Thx for any advice!

Edit: Android v2.4.0, iOS v3.0.1, Server v0.66.2

---

<div class="post-metadata">

**Author:** ![rafael.kellermann](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/rafael.kellermann/32/783_2.png) [@rafael.kellermann](https://forums.rocket.chat/u/rafael.kellermann)\
**Post date:** [July 20, 2018, 2:22pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/2 "2018-07-20T14:22:55Z")

</div>

This message appears because your server do not support WebSockets, take a look:

```auto
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: chat.thisfro.ch" -H "Origin: chat.thisfro.ch" -H "Sec-WebSocket-Key: fVXESE8fjBMx8HheW0YlZQ==" -H "Sec-WebSocket-Version: 13" https://chat.thisfro.ch/websocket

HTTP/1.1 500 Internal Server Error
Date: Fri, 20 Jul 2018 14:22:27 GMT
Server: Apache/2.4.18 (Ubuntu)
Content-Length: 612
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 jannis@thisfro.ch to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at chat.thisfro.ch Port 443</address>
</body></html>

```

---

<div class="post-metadata">

**Author:** ![thisfro](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@thisfro](https://forums.rocket.chat/u/thisfro)\
**Post date:** [July 20, 2018, 3:39pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/3 "2018-07-20T15:39:33Z")

</div>

Ok thanks, didn’t realize that. Where would I get started to enable this?

---

<div class="post-metadata">

**Author:** ![rafael.kellermann](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/rafael.kellermann/32/783_2.png) [@rafael.kellermann](https://forums.rocket.chat/u/rafael.kellermann)\
**Post date:** [July 20, 2018, 3:51pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/4 "2018-07-20T15:51:19Z")

</div>

Since you’re using Apache, you can start here: [https://rocket.chat/docs/installation/manual-installation/configuring-ssl-reverse-proxy/#running-behind-an-apache-ssl-reverse-proxy](https://rocket.chat/docs/installation/manual-installation/configuring-ssl-reverse-proxy/#running-behind-an-apache-ssl-reverse-proxy)

---

<div class="post-metadata">

**Author:** ![thisfro](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@thisfro](https://forums.rocket.chat/u/thisfro)\
**Post date:** [July 20, 2018, 4:23pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/5 "2018-07-20T16:23:56Z")

</div>

I had already set it up with this guide, but doing it again resolved the issue (somehow).

Thank you very much!

---

<div class="post-metadata">

**Author:** ![rafael.kellermann](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/rafael.kellermann/32/783_2.png) [@rafael.kellermann](https://forums.rocket.chat/u/rafael.kellermann)\
**Post date:** [July 20, 2018, 4:30pm UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/6 "2018-07-20T16:30:39Z")

</div>

Awesome, glad it worked! ❤

---

<div class="post-metadata">

**Author:** ![Blumiere](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/blumiere/32/837_2.png) [@Blumiere](https://forums.rocket.chat/u/Blumiere)\
**Post date:** [January 29, 2019, 4:02am UTC](https://forums.rocket.chat/t/mobile-apps-cannot-connect/1628/7 "2019-01-29T04:02:50Z")

</div>

Sorry to bump this thread, but this may be in the interest of anyone else searching Google.

I am having the same as OP however I installed my server via the Ubuntu snap using [these instructions](https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/). Since this seems to be the most suggested/easiest way to install the app. I was also sure to [configure SSL and Caddy](https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/autossl/).

I have this error in my console:

```auto
WebSocket connection to 'wss://xanadu.chat/sockjs/645/locu3plz/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

```

Disabling Cloudflare will change the error to:

```auto
WebSocket connection to 'wss://xanadu.chat/sockjs/521/ettojedv/websocket' failed: Error in connection establishment: net::ERR_CERT_COMMON_NAME_INVALID

```

So, the Ubuntu snap instructions by default leave me with a server that cannot use mobile apps and some other external services. It also produced this nginx server config:

```auto
 listen 443 ssl;
 server_name xanadu.chat;
 ssl_certificate /etc/letsencrypt/live/xanadu.chat/fullchain.pem;
 ssl_certificate_key /etc/letsencrypt/live/xanadu.chat/privkey.pem;
 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 root /usr/share/nginx/html;
 index index.html index.htm;
# Make site accessible from http://localhost/
 server_name localhost;
 location / {
 proxy_pass http://localhost:3000/;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection “upgrade”;
 proxy_set_header Host $http_host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forward-Proto http;
 proxy_set_header X-Nginx-Proxy true;
 proxy_redirect off;
}
}
server {
 listen 80;
 server_name xanadu.chat;
 return 301 https://$host$request_uri;
 }

```

This is a reverse proxy, yeah? Perhaps this is caused by the CERT error above, or maybe some extra config is missing?
