How do I debug on ios side?


#1

I am trying to find a good debug solution for my Ionic app which is giving me white screen with error message below

0 674970 error TypeError: Requested keys of a value that is not an object., http://192.168.0.4:8100/lib/ionic/js/ionic.bundle.js1, Line: 8236
1 675020 error Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
http://errors.angularjs.org/1.3.6/$rootScope/infdig?p0=10&p1=%5B%5D1, http://192.168.0.4:8100/lib/ionic/js/ionic.bundle.js1, Line: 12718

I was trying to follow the tutorial below and it is not clear that I dont have index.html shown in my desktop safari browser…


#2

you made something like an infinite loop.
Your changes triggers more than 10 refresh-cycles, which causes that all watchers are executed again… and angular stops after 10 cycles and a specific number of watcher calls to stop infinite digests.

AngularJS gives you a good description:
https://docs.angularjs.org/error/$rootScope/infdig?p0=10&p1=[]1

On safari it is a little bit crappy to debug, because safari does not recognize previously added break points -.-.

But this error occurs maybe also on an android device… try google remote debugging


#3

This was problem with my old template that I was using…

this part of the code below was problem and after I remove it, now its working.

.config([’$httpProvider’, function($httpProvider) {
$httpProvider.defaults.useXDomain = true;
$httpProvider.defaults.headers.common = ‘Content-Type: application/json’;
delete $httpProvider.defaults.headers.common[‘X-Requested-With’];
} ])