# Can't connect to local server from ionic android

**URL:** <https://openvidu.discourse.group/t/cant-connect-to-local-server-from-ionic-android/156>\
**Category:** Issues developing apps\
**Tags:** v2\
**Created:** [February 18, 2020, 6:18pm UTC](https://openvidu.discourse.group/t/cant-connect-to-local-server-from-ionic-android/156 "2020-02-18T18:18:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vasniktel](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vasniktel/32/93_2.png) [@Vasniktel](https://openvidu.discourse.group/u/Vasniktel)\
**Post date:** [February 18, 2020, 6:18pm UTC](https://openvidu.discourse.group/t/cant-connect-to-local-server-from-ionic-android/156/1 "2020-02-18T18:18:32Z")

</div>

Hi, I’m trying to run ionic tutorial with OpenVidu server deployed on a local machine, but every time I’m trying to join a room, I’m getting this exception:

```auto
I/Capacitor/Console: File: http://localhost/vendor.js - Line 97827 - Msg: 'OpenVidu' initialized
I/Capacitor/Console: File: http://localhost/vendor.js - Line 97828 - Msg: openvidu-browser version: 2.11.0
D/Capacitor: Handling local request: http://localhost/23.js
D/Capacitor: Handling local request: http://localhost/svg/md-power.svg
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
I/X509Util: Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
E/chromium: [ERROR:ssl_client_socket_impl.cc(941)] handshake failed; returned -1, SSL error code 1, net_error -202

```

The same ionic app works great when running on the pc (server is running on the pc as well).

---

<div class="post-metadata">

**Author:** ![Vasniktel](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vasniktel/32/93_2.png) [@Vasniktel](https://openvidu.discourse.group/u/Vasniktel)\
**Post date:** [February 18, 2020, 6:20pm UTC](https://openvidu.discourse.group/t/cant-connect-to-local-server-from-ionic-android/156/2 "2020-02-18T18:20:48Z")

</div>

Btw, I’m using capacitor instead of cordova

---

<div class="post-metadata">

**Author:** ![Vasniktel](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vasniktel/32/93_2.png) [@Vasniktel](https://openvidu.discourse.group/u/Vasniktel)\
**Post date:** [February 18, 2020, 9:58pm UTC](https://openvidu.discourse.group/t/cant-connect-to-local-server-from-ionic-android/156/3 "2020-02-18T21:58:46Z")

</div>

I managed to fix this issue by using [https://github.com/silkimen/cordova-plugin-advanced-http](https://github.com/silkimen/cordova-plugin-advanced-http) instead of @angular/common/http, but know I have a similar problem with wss:// connection.

---

<div class="post-metadata">

**Author:** ![Vasniktel](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/vasniktel/32/93_2.png) [@Vasniktel](https://openvidu.discourse.group/u/Vasniktel)\
**Post date:** [February 19, 2020, 2:59pm UTC](https://openvidu.discourse.group/t/cant-connect-to-local-server-from-ionic-android/156/4 "2020-02-19T14:59:04Z")

</div>

Solved with [https://stackoverflow.com/a/57811110/8728510](https://stackoverflow.com/a/57811110/8728510)
