-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Infinite digest on location change on iOS 9 w/ UIWebView (not in Safari/ WKWebView) #12241
Comments
I met similar issue, which happened on ios 9, but run ok on other devices. |
I reproduced this issue with the same code provided by santaslow on 1.4.1 / ios 9:
The code above run normally on desktop browser, android and ios 8 webview, but on ios 9 it will throw exception when I click the link:
|
I can no longer reproduce in iOS 9 Beta 3. |
I receive the same error with ios9 public beta (13A4293g) |
I verified the code above on ios 9 beta 3 (13A4293g), no exception anymore. But the app with using ng-view still throw infdig exceptions on ios 9 beta 3. |
I receive the same error with ios9 public beta (13A4293g) Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! |
We are also receiving this error on public Beta 3 of iOS 9 with our own Angular application. It does not occur in iOS 8. |
As a workaround, I wrote a simple directive to replace ng-view and angular-route.js. The solution worked well in our own application, all infdig exceptions disappeared on ios 9 beta/beta 3. Below is the simplified code, which is just for our own application, general use cases are not considered. I DO NOT recommend other people to use this:
|
Just installed iOS 9 Beta 4 and still have the same issue. Anyone else? |
I saw it in iOS 9 Beta 3 and I'm still seeing it in iOS 9 Beta 4. |
+1
|
Yeah we're seeing the same issue as well even with angular ui router. Does anybody have a valid work around for this issue in the meantime? |
Seeing the same issue in uiWebView on latest iOS9. |
Does anyone have any updates on this issue? |
This is still an issue. Reopening |
It looks like an ios issue. Is this tracked on webkit somewhere? |
+1 |
1 similar comment
+1 |
Same here. Our Cordova app runs fine if running as web on the iPad Safari, but the infinite digest happens if it runs as a Cordova app (UIWebView). |
Exactly the same issues as @borrull ! Already experimented with WKWebView and then the issue is non-existing. But we can't use WKWebView as we need Local File Serving (and we don't want to run a local server in our application) and cookies. So it has to do something with UIWebView in combination with Cordova/Mobile Safari on iOS 9. I'm currently debugging the $locationWatch in Angular because I see that our application wants to transition to a different location multiple times and then (after 10 times) the digest error is thrown. |
Does released 1.4.6 fix this issue for good? |
@alexislg2 - yes this release should fix the issue so you do not need to apply the patch. |
Confirmed, works for me on the simulator and device, just need my users to wait 2 weeks for Apple approval ;-( |
@dbroadhurst I heard you might be able to quote the https://openradar.appspot.com/22186109 bug report to fast track your update to your app. |
You can follow this WebKit bug for updates. |
Hi, you seem to have solved the issue of iOS9 async call on hash change on Angular.js. I've made researches, also posted on stackoverflow but the only solution I found until now is in your angular browser.js patch. I'm not really familiar with angular and I would like to understand what you did make you fix available in Would you explain how you identified and fixed the problem? |
@lchenneberg - the commit that fixes the problem in AngularJS is here 8d39bd8 The problem is that this particular browser does not update the value for console.log(window.location.href) // -> http://my.domain.com/path/to/page
window.location.href = 'http://my.domain.com/path/to/other/page';
console.log(window.location.href) // -> http://my.domain.com/path/to/page
// next tick of the event loop
console.log(window.location.href) // -> http://my.domain.com/path/to/other/page Notice that the second The fix that we have come up with, is to cache the value that we wrote, if the browser is not updating synchronously, and then to use that value from then on, instead of the value returned from Hope that helps. |
@IgorMinar 's patch worked well for me. I'm using the following versions of Angular & Ionic: window.ionic.version "1.0.1" angular.version
Object {full: "1.3.13", major: 1, minor: 3, dot: 13, codeName: "meticulous-riffleshuffle"} |
@IgorMinar's patch worked for us as well. Thanks!! But I have another question one of you may be able to answer: does launching a web page added to the iPad home screen open the page using UIWebView or WKWebView? Or, more importantly, does accessing a web application in this way take advantage of the Nitro rendering engine? |
@tpeiffer they would use wkwebview, since it's just safari without the address bar. |
Hi, I have this exact same issue with an old version of angular: 1.0.6 |
@tzamora Have you tried applying @IgorMinar's patch? Perhaps 1.0.6 is too early for it to work. |
@petebacondarwin the @IgorMinar's patch refers to a file called browser.js. I dont have any file called browser.js |
FYI, a fix for the underlying issue landed in WebKit the other day: |
I got this working with the js patch, but not straight away. New to this (angularjs and Ionic) so if someone could check this and let me know if I've missed anything major I'd really appreciate it! (e.g. is the platform object very inefficient etc) Note:
|
I ran into this problem on 8.4 on the simulator; so I don't think it's limited to just iOS 9. I just updated the agent string check to include versions iOS 8 & 9. Here's the agent string. "Mozilla/5.0 (iPhone; CPU iPhone OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12H141 (140307121489296)" |
+1 |
Hi Can someone confirm if this was solved on ios 9.2? (beta) Thanks :) |
I cannot replicate the issue as of this mornings update to iOS 9.2 (13C75) on iPhone 6. Looking good so far. This bug is still open though - https://openradar.appspot.com/22186109 |
If this patch is applied, could it have any negative effect on iOS 9.2 and up? I will test this with our own app, but I want to make sure I'm not introducing issues that don't show when testing our particular situation. As far as I can see, all the patches use a regex that filters iOS 9 and up, but not specifically 9.x up to and including 9.1. |
Hey guys, this issue is currently happening in iPhone 6 with iOS 9, can anyone let me know why? |
Updating to iOS 9.2 seems to solve it for me too. |
@bruno-serfe this is an issue on how iOS handles As stated before, this issue is present only in iOS 9.0.x as this was fixed in iOS 9.1.0. The issue posted on ionic looks like the same issue, so the same fix should work both ways. |
@lgalfaso thanks for the reply, I'll try to fix a digest error I've found, if that doesn't solve the issue I'll try upgrading angular, thanks for the reply!. |
Thanks @lgalfaso 👍 |
I had this problem when I added the web app to home screen and used it as standalone, however upgrading from AngularJS 1.4.5 to 1.5 completely solved the problem and speeded up the navigation as hell! |
@volgwfang The issue that you're having is not related to this topic? |
The following simple HTML demonstrates the issue:
This runs as expected on most devices, but it throws an infinite digest exception on iOS 9.
I'm able to reproduce on both iPad Air 2 and iPad 4th generation with iOS 9 beta 2.
I realize it's probably an issue in iOS, but it might still be worth investigating.
The text was updated successfully, but these errors were encountered: