Connection to server was unsuccessful

When I try to run ionic app in emulator or device. I get the following error:

The connection to server was unsuccessful (

However, it works alright in browser through ionic serve.

I hope it is not due to Content Security Tag or Cordova Whitelist plugin settings which are as follows:

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">

  <allow-navigation href="http://*/*"/>
  <access origin="*"/>
1 Like

Were you ever able to get this working? I’m having the same issue as well.


Ok, I think I figured out what was going on (at least for me). Basically I was having a firewall issue, and needed to make my “PC” discoverable by other PC’s (or in this case my phone) that are on the same wifi network. Once I enabled this setting everything started to work. These are the steps I took:

  1. Open your settings in Windows 10
  2. Select “Network & Internet”
  3. Select the WiFi network that you’re connected to
  4. Click “Advanced Options” at the bottom of the wifi connections list
  5. On the “Advanced Options” screen, enabled “Make this PC discoverable”

Hope that helps!