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/)

  • 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

Can you check for this line in AndroidManifest.xml

<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

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

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.