Can't send request to server


#1

hello,

when run ionic run android in a device.
always appear the errors (Debug info by chrome)
Failed to load resource: the server responded with a status of 404 (Not Found)
http://192.168.1.101:3000/api/fetch_articles?page=1

I make sure that the page http://192.168.1.101:3000/api/fetch_articles?page=1 can be opened in browser

when test it in an emulator
it shows:

device ready has not fired after 5 seconds. cordova.js:1185
Channel not fired: onPluginsReady cordova.js:1178
Channel not fired: onCordovaReady
GET http://192.168.1.101:3000/api/fetch_articles?page=1 404 (Not Found) ionic.bundle.js:18526

How to fix that?


#2

what is your version of cordova?

If it’s 5.0.0, I think the problem is because of that.

When I used cordova 4.3.0, requests with $http to the server is fine, no problem. But since I update the cordova to v5.0.0, none of my request works


#3

add whitelist plugin and allow your backend urls:


#4

yep, that works. fixed yesterday already.


#5

how did you fixed it please. on the same problem for two days now


#6

@samdeniyi you have to add the Whitelist Plugin


#7

@cyruxx thanks works perfeectly, almost done with the app