I have an ionic app which uses a service to fetch JSON from a nodejs backend and render it into views.
When viewing the app served on a desktop, the request resolves very quickly. Once I compile to an Android app and run it on a device, its much slower.
I’m using the full path and it eventually resolves, so i’m having a hard time pinpointing the issue. I’ve tried this both with full 4g connection and on wifi. I recently updated to the new version of Ionic but I’m not sure if the issue existed before then.
Anyone have ideas on how I can troubleshoot this, or have you seen it before?
Hi @dupe - did you ever get a solution to this. I’m tearing my hair out on this one. My app was working great but now $http requests are taking a loooooong time on Android. Here’s my set up:
Cordova CLI: 5.1.1
Gulp version: CLI version 3.8.11
Gulp local: Local version 3.8.11
Ionic Version: 1.0.0
Ionic CLI Version: 1.6.1
Ionic App Lib Version: 0.3.3
ios-deploy version: 1.5.0
ios-sim version: 3.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.2
Xcode version: Xcode 6.4 Build version 6E35b
I’m testing the app on a Nexus 5 and it’s connected to the wifi. I use the $cordovaNetwork plugin to print the status to the console to confirm that’s the case. I can use other apps on the device without any problem
so I’m very confident it’s not a connection issue. This is reinforced by the fact that the requests do return what they’re supposed to (“success” is received) it just takes a long time!
I read something about the default authentication of $http requests causing problems but couldn’t make any changes that helped.