$http returns status -1 on emulator and emulator's mobile browser


Hi All,

I got into an issue, $http calls won’t work on emulator or ionic view app

I am trying to access

I started chrome by enabling this flag “–disable-web-security”, ionic serve works fine and connects to both the servers

On emulator, I am getting status of “-1” when trying to connect to the two apis above.
Im getting this response back
response {“data”:null,“status”:-1,“config”:{“method”:“GET”,“transformRequest”:[null],“transformResponse”:[null],“url”:“http://www.google.com/finance/info?q=AAPL",“headers”:{“Accept”:"application/json, text/plain, /”}},“statusText”:""}

Can someone please help me on what -1 status mean and how to fix that?

Thanks in advance


Is the whitelist plugin installed and configured? Do you get any logging from de debug monitor?


Did anyone figure this out? I am having the exact same issue in an ionic 1 app.

I know I have installed the whitelist according to documentation. To make it even more fun, it works fine in iOS emulator … just not in Android.