# Ionic/Cordova: “ERR\_CONNECTION\_REFUSED”

**URL:** <https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473>\
**Category:** ionic-v1\
**Created:** [August 24, 2016, 3:01pm UTC](https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473 "2016-08-24T15:01:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MisterDev](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@MisterDev](https://forum.ionicframework.com/u/MisterDev)\
**Post date:** [August 24, 2016, 3:01pm UTC](https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473/1 "2016-08-24T15:01:23Z")

</div>

After messing up with some plugins trying to make `WKWebView` working without success, my app on every device but the browser throws this error

> Application Error net::ERR\_CONNECTION\_REFUSED ([http://localhost:0/](http://localhost:0/))

- I removed cordova-plugin-webserver
- `ionic run` doesn’t work, `ionic run -l` works  
Anyone has any clue on what’s going on?

These are my plugins

```
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-crosswalk-webview 1.8.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-facebook4 1.7.1 "Facebook Connect"
cordova-plugin-inappbrowser 1.4.0 "InAppBrowser"
cordova-plugin-keyboard 1.1.4 "Keyboard"
cordova-plugin-network-information 1.2.1 "Network Information"
cordova-plugin-sim 1.2.1 "SIM"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
twitter-connect-plugin 0.5.0 "Twitter Connect"

```

[See this on StackOverflow](http://stackoverflow.com/q/39126276/4695325)

---

<div class="post-metadata">

**Author:** ![alfabetagama](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@alfabetagama](https://forum.ionicframework.com/u/alfabetagama)\
**Post date:** [August 24, 2016, 3:34pm UTC](https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473/2 "2016-08-24T15:34:37Z")

</div>

Can you check for this line in AndroidManifest.xml

```
<uses-permission android:name="android.permission.INTERNET" />
```

---

<div class="post-metadata">

**Author:** ![MisterDev](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@MisterDev](https://forum.ionicframework.com/u/MisterDev)\
**Post date:** [August 25, 2016, 7:12am UTC](https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473/3 "2016-08-25T07:12:18Z")

</div>

> [@alfabetagama](#):
>
> \<uses-permission android:name=“android.permission.INTERNET” /\>

Thanks for your help, yes is there.  
This problem happens on ios too, so I guess it shouldn’t be something related to Cordova instead of a specific platform

---

<div class="post-metadata">

**Author:** ![alfabetagama](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@alfabetagama](https://forum.ionicframework.com/u/alfabetagama)\
**Post date:** [August 25, 2016, 10:03am UTC](https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473/4 "2016-08-25T10:03:37Z")

</div>

It is weird that the app wants to connect to [http://localhost:0/](http://localhost:0/). ? Do you call localhost in your code, or is this some plugin call?

---

<div class="post-metadata">

**Author:** ![MisterDev](https://avatars.discourse-cdn.com/v4/letter/m/46a35a/32.png) [@MisterDev](https://forum.ionicframework.com/u/MisterDev)\
**Post date:** [August 25, 2016, 10:21am UTC](https://forum.ionicframework.com/t/ionic-cordova-err-connection-refused/61473/5 "2016-08-25T10:21:07Z")

</div>

Looking at the edits history of config.xml I found that I had `<content src="http://localhost:0"/>` (livereload?) but it gave me the same error with `<content src="index.html"/>`

Removing `twitter-connect-plugin` solved my issue, still don’t know why since it has always been in my project without giving any problem.
