TypeError: Attempted to assign to readonly property. in Angularjs application on iOS8 Safari

Sara Navidpour picture Sara Navidpour · Sep 25, 2014 · Viewed 18.7k times · Source

Our Mobile App is getting "TypeError: Attempted to assign to readonly property." only on IOS 8 and the stack traces are not helpful and seem to be in Angular code.

This might be happening because of the "use strict" on top level of Angularjs code. My questions are (1) why did it start happening only on IOS8? is this an IOS8 bug? (2) or is this an angular bug surfaced on IOS8? (3) Or maybe we are violating strict mode rules but only IOS8 started to catch them! I am skeptical about the third option because strict mode is supported by other major browsers.

I have found one similar reported issue here.

Answer

Daniel Riquelme picture Daniel Riquelme · Dec 10, 2014

Looks like this is an IOS8 bug

At least the guys at ember.js will temporarily strip the 'use strict' from their code until it's fixed. Ember.js issue