Angular.js: (iOS 8 GM iPhone5C) TypeError: Attempted to assign to readonly property

Created on 17 Sep 2014  ·  163Comments  ·  Source: angular/angular.js

I am using on iOS 8 GM(iPhone5C).
With this device, I am getting this error in this line(https://github.com/angular/angular.js/blob/master/src/ng/rootScope.js#L216)
But on iOS 8 GM(iPhone5S) and iOS 7.x (iPhone5C, iPhone5S), this error does not occur.

To resolve this error, I rewrote the code as follows:

$new: function(isolate) {
        var child;

        if (isolate) {
          child = new Scope();
          child.$root = this.$root;
          // ensure that there is just one async queue per $rootScope and its children
          child.$$asyncQueue = this.$$asyncQueue;
          child.$$postDigestQueue = this.$$postDigestQueue;
        } else {
          // Only create a child scope class if somebody asks for one,
          // but cache it to allow the VM to optimize lookups.
          if (!this.$$ChildScope) {
            this.$$ChildScope = function ChildScope() {
              this['$$watchers'] = this['$$nextSibling'] =
                  this['$$childHead'] = this['$$childTail'] = null;
              this['$$listeners'] = {};
              this['$$listenerCount'] = {};
              this['$id'] = nextUid();
              this['$$ChildScope'] = null;
            };
            this.$$ChildScope.prototype = this;
          }
          child = new this.$$ChildScope();
        }
        child['this'] = child;
        child['$parent'] = this;
        child['$$prevSibling'] = this.$$childTail;
        if (this.$$childHead) {
          this.$$childTail.$$nextSibling = child;
          this.$$childTail = child;
        } else {
          this.$$childHead = this.$$childTail = child;
        }
        return child;
      },

The situation has improved, but I do not understand the reason...

Lots of comments iOS more info bug

All 163 comments

Which version of angular did you test? Does it appear simply by including angular or under specific circumstances (your app code)?

I tested AngularJS v1.2.25.

My app code is below.

page template

...
<card-item-list ng-repeat="card in cards track by $index" data-card="card"></card-item-list>

card-item-list directive

...
var cardItemList = function() {
    var link = function(scope) {};
    return {
      restrict: 'E',
      replace: true,
      templateUrl: 'templates/card/directives/list-item.html',
      scope: {
        card: '=',
      },
      link: link
    };
  };
  cardItemList.$inject = [];
...
<div class="card--list__item">
  <div ng-class="{'card--list__item_state_check': card.isSelect}">
    <card-thumb data-card="card"></card-thumb>
  </div>
  <p class="card--list__item__detail fs_xxs">
    <span ng-if="card.parameter.attack > 0">{{card.parameter.attack}}<br>&nbsp</span>
    <span ng-if="card.parameter.defense > 0">{{card.parameter.defense}}<br>{{card.parameter.speed}}</span>
  </p>
</div>

card-thumb directive

...
var cardThumb = function() {
    return {
      restrict: 'E',
      replace: true,
      transclude: true,
      templateUrl: ''templates/card/directives/card-thumb.html',
      scope: {
        card: '=',
        opts: '=?'
      },
      link: function(scope, element){
      }
    };
  };
 cardThumb.$inject = [];
...
<figure class="thumb thumb_type_1">
  <img class="thumb__img" ng-src="{{card.image_path}}"  ng-if="card.master_id">
  <figcaption class="thumb__caption" ng-transclude></figcaption>
</figure>

@christianv could you please put together a http://plnkr.co/ or http://jsbin.com/ to reproduce this?

I'll see if I can repro this on my ipad or iphone 6 (but, from what you said, it sounds like I might not be able to :()

@caitp I think you meant to notify someone else.

yeah I meant @HAKASHUN, sorry

remove 'use strict' and try

we get the same issue, and @HAKASHUN's code fixed the issue for us

We get the same issue.

I applied @HAKASHUN's code to v1.2.26

https://github.com/shunjikonishi/angular.js/commit/b91f34103974047708145e971506f354f804c17c

When I include angular.js, it works fine.
But with angular.min.js, it doesn't work.

I hope to fix this problem with both of normal and minified version.

We have also experienced this error with several different iPads, all running iOS 8. I can get exact model numbers if anybody is interested. We have tried builds with Angular versions: 1.2.24, 1.3.0, and 1.3.1

@HAKASHUN's fix has worked at least in debug (non-minified) builds.

@shunjikonishi this is just a guess (I'm dealing with the same issue) but does your minifier perhaps do something like forcing dot notation? That would effectively undo this fix. I've tried one minification with uglify (2.4) and it broke the fix, and now I'm looking into my guess. Perhaps I can ask uglify to respect dot notation, or maybe I'm way off.

_update_

Is anyone else using $route?

Also @shunjikonishi in my case, uglifyjs was forcing dot notation, effectively undoing the fix. If you're using grunt/uglify it's something like: uglify: { options: { properties: false }}

could you make a quick reproduction of this? I'd like to see it with my phone

@caitp I will see what I can do. I've got some unexpected work to take care of, but this is important, so hopefully I will have a plunker by the afternoon.

_update_

@caitp I made a plunker to attempt to reproduce this issue, and failed.

If anyone is interested in looking at my plunker attempt at reproducing, it's here: http://plnkr.co/edit/EPsxhO1OsD5MmnUyl50t?p=preview I started with a simple click updating a $scope, then tried $route changes (which is where I can consistently reproduce in my app), and then tried repeats, and a repeat in an ng-if.

I will put more time into this later.

@bennett000 Thank you for advise.

I just used output of grunt package command.

Now, I include uglify angular task in my project. It works fine.

There is one correction.
With grunt-contrib-uglify, its option format is like this.

uglify: {
    options: { 
        compress: {
            properties: false 
        }
    }
}

This also appears to affect Angular v1.3.0; we've seen it on an iOS8 device in our office, but the page it's on hits the error inconsistently (something we're researching).

Applying @shunjikonishi 's patch causes the page not to break under those conditions, but also causes "undefined" to appear on the page in places it shouldn't, and not to be removed.

Perhaps not the most useful set of details, but this is the result of an initial investigation. We can dig deeper; just wanted to note that v1.3.0 is also affected.

hey guys, we're still waiting for a reproduction =)

(so please provide one)

@caitp absolutely, reproducing the error consistently is essential.

What's odd is that I can reproduce this consistently in my application, as can others; yet I failed to reproduce in a plunker. I'm happy to keep working on reproducing this in an example, but I'd really like to get more details from other people who have this issue.

In our case:

  • Web app is "saved" to iOS home screen
  • Web app is run from iOS home screen
  • Web app breaks after a few $location.path() calls

iDevice model numbers known to be affected:

  • MD528C/A
  • MD516C/A
  • MF432C/A

I'm wondering if there is a difference if the application is run from the iOS home screen, as opposed to being run in iOS Safari, or in a WebView, or WKView; this has been the case in older iOS versions.

I will work more on a plunker, and I will also take the plunker code, and spin it into a self contained application so I can see if I can reproduce it when "saved" to the iOS home screen.

Again, any extra information anyone else has about their issues would be helpful.

_update_

Dropping the existing plunkr stuff I had done into a full blown iOS homescreen web app does not seem to have had any additional effect.

Is anyone else using any custom gestures, or doing anything special to avoid things like iOS's bounce scrolling?

Removing the 'use strict'; solve the issue for me (iPhone 5C iOS 8.1).

Over the last few weeks I continued to fail to reproduce this problem in a controlled environment, like a plunkr. On top of that, other workarounds, including removing 'use strict' do not help me. Obviously without a controlled reproduction of this issue there's nowhere to begin solving this problem. However it occurred to me that Angular ships with its own unit test suite; how do those tests perform on my devices?

  • Angular.js commit: 9a616eade4386341e51f993fe8824840ea96a8e9
  • On Ubuntu 12.04, running Chromium 37.0.2062 _all tests pass_
  • On iOS 7.1.2, running mobile Safari 7.0.0, (Model MF432C/A) _all tests pass_
  • On iOS 8.1.1, running mobile Safari 8.0.0, (Model MD528C/A) one tests fails

Mobile Safari 8.0.0 (iOS 8.1.1) private mocks createMockStyleSheet should allow custom styles to be created and removed when the stylesheet is destroyed FAILED Expected '0px' to be '2px'. ~/Workspaces/angular.js/test/helpers/privateMocksSpec.js:23:47

My guess is that this failed test is unrelated.

Again, anyone with any suggestions on how to reproduce the iOS 8 readonly error would be helpful. I do know _other_ frameworks have had _similar_ issues with readonly property assignments in iOS8.x but they have not helped me reproduce. Here are the links that reference the _similar_ issues some others have encountered

Other steps I've taken to mitigate this problem have been to comb over our entire source, and the source of _every_ library we use to find anything that might set a property read only. This includes grepping for:

  • Object.create()
  • freeze
  • writable
  • configurable
  • defineProperty

Is there anything else that might make JavaScript throw a type error read only? Not being able to reproduce this is not helping my sanity.

We are also running into this.
We were able to reproduce the problem only on the actual device (in our case IPhone 5C) with an IOS version prior to 8.1 (we're testing on 8.0.2 and the problem recurs continuously).

This is quite a serious issue, is there any known workaround?

(We're on Angular 1.3.6, updated today, problem still persists)

@m3kka did you manage to isolate the problem? It will be very hard to move on this one without narrowing it down first.

Spent the afternoon looking for a way to reproduce the error in a controlled environment but still no solutions sadly.

I've expanded a bit the workaround of @HAKASHUN so if anyone needs a fast - notSoGood - fix this is what I did.

_AngularJS_ ver. 1.3.6:

RootScope
https://github.com/angular/angular.js/blob/master/src/ng/rootScope.js#L208
From:

          if (!this.$$ChildScope) {
            this.$$ChildScope = function ChildScope() {
              this.$$watchers = this.$$nextSibling =
                  this.$$childHead = this.$$childTail = null;
              this.$$listeners = {};
              this.$$listenerCount = {};
              this.$id = nextUid();
              this.$$ChildScope = null;
            };

To:

          if (!this['$$ChildScope']) {
            this['$$ChildScope'] = function ChildScope() {
              this['$$watchers'] = this['$$nextSibling'] =
                  this['$$childHead'] = this['$$childTail'] = null;
              this['$$listeners'] = {};
              this['$$listenerCount'] = {};
              this['$id'] = nextUid();
              this['$$ChildScope'] = null;
            };

https://github.com/angular/angular.js/blob/master/src/ng/rootScope.js#L221
From:

        child.$parent = parent;
        child.$$prevSibling = parent.$$childTail;

To:

        child['$parent'] = parent;
        child['$$prevSibling'] = parent.$$childTail;

Compile
https://github.com/angular/angular.js/blob/master/src/ng/compile.js#L1375
From:

transcludedScope.$$transcluded = true;

To

transcludedScope['$$transcluded'] = true;

Until now I am not able to help you with more informations, will keep looking into the issue.

I figured this one out. iOS dies on this line:

              this.$$watchers = this.$$nextSibling =
                  this.$$childHead = this.$$childTail = null;

When I broke this out into separate statements, I found the error was caused when this.$$watchers was assigned first. The following worked correctly:

              this.$$childTail = null;
              this.$$childHead = null;
              this.$$nextSibling = null;
              this.$$watchers = null;

I suspect iOS executes the order of the assignment incorrectly, causing the error. I don't know where else this syntax difference would cause errors, but I suspect it has far reaching implications.

@Wasmoo wow, this sounds strange. Are you able to isolate this thing in a minimal example, ideally in plunker? If so this would be definitively an issue on the browser side.

@pkozlowski-opensource Unfortunately no. I just ran into the error on the project I'm working on and I have no idea of its source (jQuery throws something at Angular). As it is in my project, you have to click on just the right things in just the right order to get the error to occur, but this and only this change fixes my problem.

Hopefully someone else who is getting the error can confirm the fix.

We are experiencing this problem in 'heavy' page filled with several scopes and template, simplifying this out in a plunker seems really difficoult :/

I'll try @Wasmoo's fix out, will post back the result on our codebase in a couple minutes.

Nope @Wasmoo's is not solving the issue in our codebase.

:-( Sadness!
I also confirmed that iOS does assignment in this syntax in the correct order:

    j.a = j.b = j.c = 0;

is equivalent to

    j.c = 0;
    j.b = 0;
    j.a = 0;

So that throws that theory out, though I can't explain why my fix works for me.

For what it's worth, my project is still broken - my fix only moved the bug so it fails in the same way at some other point.

@Wasmoo by applying my workaround you should be able to remove the problem (still you're gonna have to maintain for the next angular versions)

@m3kka Works like magic!

@m3kka would it mean that Safari on iOS doesn't like dotted access to properties staring with $? Hmm, there must be something additional going on...

Here's a monkey patch I created to not have to modify the angular.js source code directly. I've been using it for the past few weeks with no more issues. It was based on angular 1.3.3.

https://gist.github.com/jhunken/767cdf62ecc9f31c56da

I also haven't been able to reproduce this issue with a minimal example unfortunately.

If someone is looking for a solution without having to use a patched version of Angular, you could try the following.

I had a couple nested state controllers for ui-router and noticed the error was being triggered by a couple lines that were accessing variables on a parent scope. In an attempt to gain access to these variables without going through the scope I set up my controller using the Controller as syntax. This made it so I could access the variables directly without having to traverse up the scopes.

Not sure if this will work for everyone but my application no longer throws the error.

@pkozlowski-opensource I think that IOS is somehow messing up with the readonly property on js objects. Apparently accessing the elements with the 'key notation' (can't remember the actual name) ignores this mess up.

Also apparently Angular is not the only one affected by this issue -http://craigsworks.com/projects/forums/showthread.php?tid=3649

@jhunken You made me bash my head. Should have used decorators from the beginning. Thank you :)

I have the same problem. Suggested workaround seems to solved it. I use @jhunken's decorator.

Noob question: what does this issue being in purgatory milestone mean? It doesn't sound good.

I still have yet to reproduce this, and I have wasted a lot of time trying. I am however happy to say that @jhunken 's monkey patch _seems_ to have solved my problems for now. I look forward to figuring out _why_ this works since I squandered so much time stepping through this process over/over without getting any results.

Adding some details that probably are not useful on their own, but... On iOS 8.1.2 iPad 2 and mini I have seen the "TypeError: Attempted to assign to readonly property". It's a large app, so hard to get into plunkr.

We had the issue appearing consistently using Angular 1.3.7 (we had removed 'use strict' from the min file for v1.3 to fix this same problem, but didn't remove it after the upgrade). Last time the error was popping up in a different place in the app and was less consistent. This time we had repro steps to do it on demand. Removing 'use strict' from angular.min.js fixed the issue. The final step before the error involved changing the route (we use the standard router: ngRoute). In our case this resulted in a data grid with no data and the messages weren't translated (using the translate directive from pascalprecht.translate). Switching the route again using the same dropdown or refreshing would get the page working again.

I do believe this is a mobile safari bug because we do not see it in any other browser.

This seems to be an iOS 8 bug - http://stackoverflow.com/a/27401601

On bugsnag error logs for my application I also see that only on Mobile safari with iOS 8.0 and 8.1

Below is a stack trace for angular 1.2.28. The same issue is there also for 1.2.24.

TypeError Attempted to assign to readonly property.
    angular.js:12188:37 $$childScopeClass
    angular.js:12198:8 prototype
    angular.js:6161:29 
    angular.js:6773:35 controllersBoundTransclude
    angular.js:21409:16 link
    angular.js:6752:19 nodeLinkFn
    angular.js:6146:23 compositeLinkFn
    angular.js:6746:35 nodeLinkFn
    angular.js:6954:36 
    angular.js:8171:13 
    angular.js:11682:81 wrappedCallback
    angular.js:11768:34 
    angular.js:12811:28 prototype
    angular.js:12623:36 prototype
    angular.js:12915:12 prototype
    angular.js:19264:29 
    angular.js:2853:14 
    angular.js:325:22 forEach
    angular.js:2852:12 eventHandler

Is there any other fix for this besides removing 'use strict'? I would like to CDN angular and this would disable it...

edit: using gist works. sorry about that

Monkey patching worked for me too, Obviously not a good solution, and this is a bug that is breaking angular out in production. Looks like ios8 webkit really dislikes assignment of .$$variables

For some info, I had to patch compile.js as my directives compile phase was being borked.

transcludedScope['$$transcluded'] = true;

Making some changes from dot notation to brackets notation by monkey patching like @jhunken did worked for me too. Very strange problem.

Still no word about an official solution?

Removing use strict did it for me. Still waiting on the official solution though.

@rjbernaldo To clarify, are you removing 'use strict' from angular.js, your own source files, or both?

@hamstu I removed it from angular.js only.

Removing 'use strict'; fixed the issue on my end as well. I'm fairly convinced Apple is trying to kill off web-apps with breakage like this. =]

Removing 'use strict'; did stop the crashes but seems to have caused another problem: now my app seems to hang instead of crashing, and the tab in Safari becomes totally unresponsive. This even happens in the iOS simulator, and the simulator process starts using 200% CPU on my mac.

Has this happened to anyone else?

could you post a stack trace of the crash, along with versions of al the libraries you're using? that would be helpfulp.

oh hang on, I see what it is... wow I don't think that's the right behaviour in JSC, but just to check...

I haven't been able to reproduce this on my iphone, ipad, or any of the ios simulators I've tried. It looks to me like the issue is the prototype property being incorrectly defined as non-writable in JSC, which would be a bug (and, would explain why it's no longer reproducible if they've fixed it). If that's not the bug being hit, then please supply a reproduction for us.

To me it seems more like that the bug creating this problem is https://bugs.webkit.org/show_bug.cgi?id=138038 (posted in a previous answer by @edzis)

@m3kka we aren't using O.create anywhere in 1.2.x

In our situation this problem started when we moved to 1.3.x branch, in which source code I can find some instances of Object.create()

Am I completely off track?

The original bug report (and most of the comments) indicate that this affects version 1.2.x

at any rate, anyone experiencing this issue, please provide a reproduction :<

Here's what I get out of the Safari console from the iOS simulator on a iPhone 5 running iOS 8.0. This is with AngularJS v1.3.13.

[Error] Error: Attempted to assign to readonly property.
ChildScope@http://localhost:9000/bower_components/angular/angular.js:13682:42
$new@http://localhost:9000/bower_components/angular/angular.js:13690:40
boundTranscludeFn@http://localhost:9000/bower_components/angular/angular.js:7092:40
controllersBoundTransclude@http://localhost:9000/bower_components/angular/angular.js:7756:35
ngRepeatAction@http://localhost:9000/bower_components/angular/angular.js:24502:26
$watchCollectionAction@http://localhost:9000/bower_components/angular/angular.js:14110:21
$digest@http://localhost:9000/bower_components/angular/angular.js:14243:31
$apply@http://localhost:9000/bower_components/angular/angular.js:14506:31
done@http://localhost:9000/bower_components/angular/angular.js:9659:53
completeRequest@http://localhost:9000/bower_components/angular/angular.js:9849:15
requestLoaded@http://localhost:9000/bower_components/angular/angular.js:9790:24
  (anonymous function) (angular.js, line 11607)
  (anonymous function) (angular.js, line 8557)
  $digest (angular.js, line 14261)
  $apply (angular.js, line 14506)
  done (angular.js, line 9659)
  completeRequest (angular.js, line 9849)
  requestLoaded (angular.js, line 9790)

@pascalc great, now provide a reproduction =)

Using AngularJS v1.2.22
Error: Attempted to assign to readonly property.
$$childScopeClass@http://XXX/bower_components/angular/angular.js:12037:23
$new@http://12wbt-frontend.dev/bower_components/angular/angular.js:12045:45
compositeLinkFn@http://XXX/bower_components/angular/angular.js:6067:38
compositeLinkFn@http://XXX/bower_components/angular/angular.js:6089:24
compositeLinkFn@http://XXX/bower_components/angular/angular.js:6089:24
compositeLinkFn@http://XXX/bower_components/angular/angular.js:6089:24
nodeLinkFn@http://XXX/bower_components/angular/angular.js:6686:35
compositeLinkFn@http://XXX/bower_components/angular/angular.js:6086:23
publicLinkFn@http://XXX/bower_components/angular/angular.js:5982:45
http://XXX/assets/scripts/app.js:51874:49

and the code in app.js is '$compile(element.contents())($scope);' . The error is reproduced on Ipad safari with IOS Simulator. Commenting out 'user strict' does fix the error as well.

@chriswu14 please provide a reproduction in addition, thanks!

Seeing the issue as well. That said, not sure how successful or even useful the 'reproduction' request is, in light of the fact that this phenomena seems _very_ specific to certain setups. Eg. I only ran into this with ui-router, child ui-states & views AND the iphone 5 iOS simulator.

Remove any of the variables and it works fine, with the key issue apparently being the iPhone5 sim.

The iPhone 4S and 5S work like a charm and so does the iPad2 / retina sim.

I agree. More than one person tried to reproduce this in a controlled environment unsuccessfully (me included), I guess it won't be fixed anytime soon.

I experience the same problem on iPhone 6 also, developing with Ionic
framework

On Tue, Mar 17, 2015 at 7:50 PM, Marco Visintin [email protected]
wrote:

I agree. More than one person tried to reproduce this in a controlled
environment unsuccessfully (me included), I guess it won't be fixed anytime
soon.


Reply to this email directly or view it on GitHub
https://github.com/angular/angular.js/issues/9128#issuecomment-82496015.

I am too having the same issue iphone 6 simulator running iOS 8.2

I'm having the same problem on my iPad (3rd generation) running iOS 8.2 (12D508), with remote logging. And the problem goes away when I remove "use strict" from the angular.js source code. Have anybody notified Apple about this?

Without a reproduction it's unlikely this issue can be taken seriously by anyone, and those (relatively) few of us affected by the issue have mostly found alternate solutions. Every so often I set aside some time to attempt a reproduction, and I get nowhere.

I've experienced the problem on all versions of iOS >= 8.0.0, but only on a few models. I've tried several Angular versions in the 1.2.x, and 1.3.x lines, up to 1.3.14 - I don't encounter the issue in any of my unit tests, or e2e component tests - only in one particular application, typically on route change, and only after the app has been running for a while.

jhunken 's solution has worked very well for me. Using it _unminified_ I don't have issues at all. However minifications with Uglify, and Closure Compiler break the fix. I have not had time to try excluding the decorator from the minification process, and catting it on yet...

just fwiw, it's okay if the reproduction is not "minimal", though simpler is better --- you can link to an affected app (ideally with minimal backend requirements, so it's easier for us to build a repro with)

@caitp I'm seeing this consistently here. If you click the "cross" in the upper-right of the screen, I get the error described (and the main part of the screen goes white - it should navigate to another page). Note that it doesn't happen in the iOS simulator, but using iOS 8.2 on an iPhone 5 I can reproduce every time.

@iainbeeston I can't repro that on my iphone 6 or ipad air :( I'll see what I can do though (you might want to try clearing history on the phone though, it could be a caching bug of some kind)

I've cleared the cache and it still happens on my iPhone 5.

I've also just tested on an iPhone 6 (also iOS 8.2) and as you said, it works correctly there. So it seems to be specific to iPhone 5x (not sure about iPhone 4x).

I collect Angular JS errors from my website and I see this error on random iPads and iPhones based on user agent.

I have tried to reproduce this on an iPhone 5, iPad mini2 and iPad air and I cannot replicate it.

@iainbeeston I tried that on my iPad but I wasn't 100% sure what you meant by cross - can I assume the layout is different on the pad?

Anyway clicking on a few things, including the toggling menu, and an 'x' didn't throw any errors on my pad, IIRC my mini's model is MD528C/A

It's possible it only affects iphone 5 and before.

On Wed, 25 Mar 2015 at 16:35 Michael Bennett [email protected]
wrote:

@iainbeeston https://github.com/iainbeeston I tried that on my iPad but
I wasn't 100% sure what you meant by cross - can I assume the layout is
different on the pad?

Anyway clicking on a few things, including the toggling menu, and an 'x'
didn't throw any errors on my pad, IIRC my mini's model is MD528C/A


Reply to this email directly or view it on GitHub
https://github.com/angular/angular.js/issues/9128#issuecomment-86107019.

I've asked a family member with an iphone 5 (no additional details on the model #, but hey) on iOS 8.2 to try it, and they sent back screenshots that appear to be working just fine. This seems like a bit of a heisenbug, maybe it's worth reporting it as a bug on Safari itself

Hey that's interesting. Works for me too now (we've updated the code since
then, so perhaps an unrelated change fixed it?)

Does anyone else have a site that can reliably reproduce the issue?
On Wed, 25 Mar 2015 at 4:59 pm, ⭐caitp⭐ [email protected] wrote:

I've asked a family member with an iphone 5 (no additional details on the
model #, but hey) on iOS 8.2 to try it, and they sent back screenshots that
appear to be working just fine. This seems like a bit of a heisenbug, maybe
it's worth reporting it as a bug on Safari itself


Reply to this email directly or view it on GitHub
https://github.com/angular/angular.js/issues/9128#issuecomment-86121113.

I have a reproducible scenario on the website I'm working on, but I can only share the login details privately. Please give me your email so I can send you the details.

@caitp I'm still getting the problem actually. If you go to the same page as before, then click the arrow at the top-left arrow (which loads the previous page), then the arrow at the top-right (which goes back to the original page) I get the error fairly reliably.

photo 02-04-2015 3 08 25 pm

If it doesn't happen immediately, try clicking back and forth a few times (just click on the arrows, but not the cross icon). You can tell the error has occurred because the image no longer appears.

photo 02-04-2015 3 13 29 pm

This is on an iPhone 5 (A1429), running iOS 8.2 and mobile safari 8.0 (useragent Mozilla/5.0 (iPhone; CPU iPhone OS 8_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12D508 Safari/600.1.4)

as explained, I'm unable to reproduce this on 3 different iOS devices, or any of the iOS simulator devices.

I think you should file this as a bug on webkit or contact Apple. There is very little anyone can do if we can't see the bug ourselves

Sorry, I just figured that a more detailed explanation would help reproduce the bug.

Is it worth closing this issue then?

It seems to me this bug is random on devices and iOS versions. I have several devices and I cannot reproduce the fault, but I know that some people on my website do experience this problem because I see the error messages.

I would suggest that under these circumstances, perhaps it's something about the configuration of the devices, some settings or perhaps some other software that's been installed that causes the conflict.

This is obviously a problem for a lot of people. The fact that it is not reproducible in a controlled environment does in my opinion not preclude any fixes for the given problem to be implemented. As it seems, there is a monkey-patch available that fixes the problem. If said monkey-patch does not cause any other verifiable problems (in unit tests etc.) I don't really understand the reasoning behind not applying it and fixing the problem for everyone.

If said monkey-patch does not cause any other verifiable problems (in unit tests etc.) I don't really understand the reasoning behind not applying it and fixing the problem for everyone.

send a PR =)

@caitp wrote:

send a PR =)

I'd prefer if @jhunken as the author of said monkey patch could do it. :)

@asbjornu I've been lucky enough to benefit from jhunken's patch _but_ in my use case the monkey patch has not worked after minification. If my problem is the same problem other people have; accepting this patch won't necessarily fix anything.

If I can get the go ahead to publish our demo, then we should be able to reproduce on other devices. This might not be for another month though. There is also the chance that the recent iOS 8.3 release has fixed this problem, but I haven't had a chance to test yet.

Hi, @spencerwi , have you figured out why the "undefined" word appears when applying the patch? Have you found any other workaround? Thanks

@totemika @spencerwi from our side we just get rid of the "undefined" by changing the way we are using translate, e.g.

it was not working using:

<h2 translate="'GETTING_STARTED_HEADLINE"></h2>

It works with:

<h2>{{ 'GETTING_STARTED_HEADLINE' | translate }}</h2>

@brauliodiez @spencerwi That totally worked :+1:

@bennett000 btw - I've just upgraded to iOS 8.3 and I can confirm that I'm still getting this issue.

To be clear, I get it with or without the monkey patch on an iPad 4G (2012) running both iOS 8.3 and iOS 8.1.3. It's not always reproducible - sometimes just attaching it to a Safari debugger running on a Mac fixes it, but then other times it still goes wrong when attached (which at least allows me to read the exception trace).

Are you using angular translate?

@brauliodiez - I am using angular-translate yes - and angular-ui-router which is actually in the stack trace below.

angular#1.3.15
angular-translate#2.4.2
angular-ui-router#0.2.13
Error: Attempted to assign to readonly property.
ChildScope@http://<hostname_redacted>/2/vendor/angular/angular.js:13617:34
$new@http://<hostname_redacted>/2/vendor/angular/angular.js:13759:40
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7096:38
nodeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7763:35
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7117:23
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7120:24
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7120:24
nodeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7763:35
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7117:23
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7120:24
publicLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:6996:45
http://<hostname_redacted>/2/vendor/angular-ui-router/release/angular-ui-router.js:3905:13
invokeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:8258:15
nodeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7768:23
compositeLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:7117:23
publicLinkFn@http://<hostname_redacted>/2/vendor/angular/angular.js:6996:45
updateView@http://<hostname_redacted>/2/vendor/angular-ui-router/release/angular-ui-router.js:3839:34
http://<hostname_redacted>/2/vendor/angular-ui-router/release/angular-ui-router.js:3801:21
$broadcast@http://<hostname_redacted>/2/vendor/angular/angular.js:14785:33
http://<hostname_redacted>/2/vendor/angular-ui-router/release/angular-ui-router.js:3218:32
processQueue@http://<hostname_redacted>/2/vendor/angular/angular.js:13248:29
http://<hostname_redacted>/2/vendor/angular/angular.js:13264:39
$eval@http://<hostname_redacted>/2/vendor/angular/angular.js:14466:28
$digest@http://<hostname_redacted>/2/vendor/angular/angular.js:14282:36
$apply@http://<hostname_redacted>/2/vendor/angular/angular.js:14571:31
done@http://<hostname_redacted>/2/vendor/angular/angular.js:9698:53
completeRequest@http://<hostname_redacted>/2/vendor/angular/angular.js:9888:15
requestLoaded@http://<hostname_redacted>/2/vendor/angular/angular.js:9829:24 <div ui-view="main" class="ng-scope">

Edit: Just upgraded to angular-ui-router#0.2.14, angular-translate#2.6.1 and the problem remains.

@pascalc On removing 'use strict', I also see the browser hanging after 5-10 mins.
angularjs-1.3.15, ios-8.3, iPad-2, ui-router-0.2.13

Any other workarounds that solved this problem for you? Any help would be much appreciated.

Webkit issue for the same https://bugs.webkit.org/show_bug.cgi?id=49739

I use angular material and getting the same "Error: Attempted to assign to readonly property." almost always on my 8.3 iOS iPad (first retina). Monkey patch does not solve the problem for me. Also deleting "use strict" in angular and angular-material makes everything worse. There are no error messages in safari remote debugger anymore but the page loads only in parts - from ng-repeat half of the items are randomly displayed correct, other half is shown with {{...}} as plain text.

Maybe somebody can use my testcase http://v2.atocc.de/testcase just click on "öffnen" of one of the listed diagrams on an iPad - I always get 4x"Error: Attempted to assign to readonly property." in about 80% of my many reloads / tries - but still sometimes it works. The testcase works fine on desktop browsers. I have another angular-material app without any problem so I can't simplify the testcase.

@gitmh thanks for the reproduction, taking a look on my ipad =)

This has been extremely frustrating to track down, I'm sorry for everyone having issues supporting iOS devices due to this problem :(

@gitmh I've been trying for a while, but I can't seem to reproduce this on an iPad (MD787C/A) with iOS 8.3 --- Method: Press on "öffnen" buttons on random graphs (whether same button is pressed sequentially or not doesn't seem to have an impact).

If any WebKit/JSC gurus know if there are any flags to force (different types of) optimization of even cold code, that might be helpful in tracking this down.

@gitmh I'm getting the "Attempted to assign to readonly property" error about every other time I click on offnen with iPad 2 simulator iOS 8.3 (12F69).

I'm having the same issue in my Angular application :(

For me this looks like a timing issue on the iPad - my example is loading a diagram with multiple small parts with lot's of ng-bindings. A small diagram works better - lets say 30% of the time and a large diagram only 5% of my tries. The result for the user is an empty diagram panel on the right side of the window. Seldom also the starting page of the testcase shows only some cards with "öffnen" buttons - so material buttons seems to be a good example for reproduction. I made other copys like http://v2.atocc.de/testcase2 where I deleted "use strict" in angluar, angular-route, angular-material and angular-aria. This makes the whole app unuseable but no error messages in safari. Added another http://v2.atocc.de/testcase3 without use of jquery to make sure it's not a problem with it. http://v2.atocc.de/testcase4 without jquery but with "use strict". I also disabled any caching with headers so on each testcase the title should change to TESTCASE n.

@gitmh I agree, timing/load seems to be the trigger. In my application, I don't see this error until I stress the CPU. Other conditions mentioned in this thread (iOS version, translate, etc) do not seem to be related as I have seen it on iPad mini, iPad air 2, iPhone 5s, and the simulator on every 8.x version of iOS and also in cordova using UIWebView and WKWebView. I have no log of it happening on any device since removing 'use strict'. It also explains why it is so damn hard to reproduce.

I added another testcase http://v2.atocc.de/testcase5 with the monkey patch from @jhunken it works much better but still sometimes the app breaks without error message. The "Error: Attempted to assign to readonly property." messages disappeared now.

+1 Bumped into the same as everyone describe.

  1. I can confirm the error using @gitmh testcase on my test iPad MD328FD/A with iOS 8.3
  2. My app is consistently hitting this issue. but it's in private-beta, shareable only via PM.
  3. I use some of the same dependencies others mention:
    angular#1.3.15, angular-ui-router#0.2.14, angular-translate#2.4.2
  4. Removing "use strict" makes safari hang as @pascalc and @bewithjonam mention

+1 also, I'm getting this on multiple iphones/ipads all running some version of iOS 8
2 hours before the first occurence was reported, I merged this in my bower.json (no issue whatsoever before this merge, and no other merge were done that day)

-    "ngCordova": "0.1.14-alpha",
-    "ionic": "1.0.0-rc.3",
-    "mapbox.js": "2.1.6",
+    "ngCordova": "0.1.15-alpha",
+    "ionic": "1.0.0-rc.4",
+    "mapbox.js": "2.1.8",

Here are the full dependencies:

  "dependencies": {
    "ngCordova": "0.1.15-alpha",
    "ionic": "1.0.0-rc.4",
    "angular-animate": "1.3.15",
    "angular-sanitize": "1.3.15",
    "mapbox.js": "2.1.8",
    "leaflet": "0.7.3",
    "rollbar.js": "1.2.1"
  },
  "resolutions": {
    "angular": "1.3.15",
    "angular-animate": "1.3.15",
    "angular-sanitize": "1.3.15"
  }

In update to our stack, we've been running without "use strict" for a while, and have started to hit Safari lockups. In the worst cases, users have to power off and power on the device to get Safari responsive again.

I'm optimistic now that there's a consistent reproduction that a fix might be possible, but in the short term, has anyone found a viable workaround?

To contribute more to the discussion around common dependencies, we're now using:

{
    ...
    "angular": "~1.3.15",
    "angular-translate": "~2.6.1",
    "ui-route": "0.2.13",
    ...
}

...but we saw this issue before introducing ui-router to our stack. This (plus the lines pointed to by the stack trace) make me think that there's something else happening here with how $scope is kept up-to-date that just happens to be exacerbated or made more frequent by how some of these libs interact with core Angular.

+1

I see the problem on non-64 bit devices running iOS 8. iPad 2/3/4, mini, etc. are affected. Devices NOT affected are iPad Air/Air 2, mini 2/3.

It is an Apple bug, but since other frameworks (Ember, Require, etc.) are putting in workarounds, it'd be nice to see Angular implement a workaround as well.

btw, does anyone know where to submit these kinds of bugs to Apple?

Also, I'll add that the removal of 'use strict' only goes so far. Like @spencerwi stated, we see Safari lock up completely and user has to force quit.

It only happens on Safari on iOS8 (non 64-bit) too... not Chrome. just fyi.

@HAKASHUN and @m3kka 's solution of changing from dot to array notation worked. Why 32-bit Safari is choking on dot notation on those lines, I don't know. That's a mystery Apple probably needs to solve.

Can the array notation be put into Angular proper to resolve this problem for everyone?

We (Amplify Education, http://amplify.com) are also encountering this issue. We tried removing 'use strict', various changes in our stack. Currently considering using this patch to work around it.

By the way, I've had success making @jhunken's decorator patch minification-safe by declaring the offending property names as string vars, then referencing them with bracket notation.

var $id = '$id',
    $$childScopeClass = '$$childScopeClass',
    ...

And then:

...
this[$id] = nextUid();
this[$$childScopeClass] = null;
...

Full forked gist available here (modeled off Angular 1.2.23)

@zourtney thanks for publishing that, I added the decorator to our app which was producing quite many tracebacks related to this from iOS devices. It has been a life saver as our app was totally unusable, especially on iPads. We are currently using Angular 1.3.8.
EDIT I just checked that there are some differences in the $new method in the version in the decorator and 1.3.8, I am looking into updating the patch

Seems there are more places where there is this misbehaviour for iOS devices, we got new tracebacks in Sentry now pointing to this line:

https://github.com/angular/angular.js/blob/bab474aa8b146f6732857c3af1a8b3b010fda8b0/src/ng/compile.js#L1096

this.$attr[key] = attrName = snake_case(key, '-');

most likely this will work if written in same format as in your patch

var $attr = '$attr';
this[$attr][key] = attrName = snake_case(key, '-');

This is aligned with the comments in this thread around Dec 9 2014 https://github.com/angular/angular.js/issues/9128#issuecomment-66314752

Unfortunately I don't have time in the coming days to try setting up a reproducible environment for this.
Some more info to create a reproducible environment: this is triggered in a "non interactive" call as the starting point of the traceback is here https://github.com/angular/angular.js/blob/v1.3.8/src/ng/browser.js#L49

I forked and adapted the gist decorator by @zourtney to work in Angular 1.3.8 here: https://gist.github.com/harrastia/4a963e62605f73bbfff2

To follow the webkit issue : https://bugs.webkit.org/show_bug.cgi?id=138038. Seems that a patch is on the way.

+1
Removing 'strict mode' from angular.js just kind of alleviate the problem but it still happens randomly.

bower.json:

"dependencies": {
    "angular": "1.3.15",
    "angular-route": "~1.3.5",
 }

I just encountered this problem on my production site, and I noticed that the bug came from my Grunt's HTML minification task (really!), and specifically, from having the removeOptionalTags option enabled.

The second I disabled removeOptionalTags, everything started working again.

PS: If you used yeoman angular, you have this option setup.

I ran into this today as well for my website (Iphone 5 iOS 8).. I'm using Angular 1.2.28.

+1 on ios 8 emulator, ionic 1.0, angular 1.3.16

I am only experience this bug when having form elements wrapped in a directive template.
With or without a transclude.

currently i have a contact form directive. template html is:

<div>
<container h-max="1">
  <column align="left">
    <ng-transclude></ng-transclude>
  </column>
</container>
</div>

and in the index file i use it:

<contact-form css-prefix="contact-form">

     <ng-input form-id="voornaam" class="form-control"></ng-input>
     <ng-input form-id="achternaam" class="form-control"></ng-input>
     <ng-input form-id="bedrijf" class="form-control"></ng-input>
     <ng-input form-id="telefoon" class="form-control"></ng-input>
     <ng-input form-id="email" class="form-control"></ng-input>
     <ng-text-area form-id="vraag" class="form-control"></ng-text-area>
     <button ng-click="sendContactForm()" class="btn btn-primary contact-form-button"><lang parent-id="contact_form" id="button"></lang></button>
    </contact-form>

There is much more code in my project but i was wondering if it could be due to form elements causing this bug.

When will it be applied in the master branch? Any idea?

@dhyegofernando you should ask apple... the bug is fixed, but isn't deployed. see here: https://bugs.webkit.org/show_bug.cgi?id=138038#c19

We've been using @jhunken's decorator but ran into issues with scope id's when upgrading to Angular 1.4. We managed to work around it by wrapping the $new function in a try catch block, inspired by this thread:
http://stackoverflow.com/questions/13147026/disabling-jit-in-safari-6-to-workaround-severe-javascript-jit-bugs

This updated monkey patch decorator works for us:
https://gist.github.com/johgusta/46fb1ecd459dbc3bfdfc

My company has released a utility which rewrites our code with all dot property assignments changed to bracket notation assignments.

That is, it rewrites the following code

object.$$a = 5;

to this

var __webkitAssign__$$a = '$$a';
object[__webkitAssign__$$a] = 5;

as a workaround to prevent a TypeError. The utility is available on npm. It has alleviated the "readonly" issue for us on iOS.

For a while, my company simply removed 'use strict';, but recently we encountered a strange bug where repeatedly opening dialogs from angular's material design library resulted in the page freezing. An error was thrown: Error: null is not an object (evaluating 'parent.$$childTail.$$nextSibling = child'), and I suppose that somehow resulted in $digest looping infinitely (thus the freeze).

We tried adding 'use strict'; back, but then we started seeing the "readonly" error at exactly the same time as the aforementioned error. This leads me to believe the null reference is related to this JIT bug, and that the bug is not (or hopefully, _was_ not) limited to just strict mode.

The utility isn't perfect, but it at least seems to fix the issue on the angular.js distributed via bower.

I have verified that @jacksonrayhamilton 's solution works wonderfully on v1.2.26

For me @jacksonrayhamilton 's solution also works flawlessly on v1.4.1

I mentioned before that patching AngularJS worked for me, in a new project it was not enough. I used the utility that @jacksonrayhamilton posted and now it works, thanks! (v1.3.16 and 1.4.3)

This was finally fixed in webkit https://bugs.webkit.org/show_bug.cgi?id=138038#c21 but it will take some time for the updates to be on everybody's phone

I am using this patch and it created another issue on angularjs 1.4.3 (previously I used 1.2.28):
If you have directive with isolated scope that contains ngRepeat (or another ng directive that creates new scope) it won't evaluate any expressions inside the ngRepeat HTML. It will just print "text with {{ variableName }}" instead of the value.
Here is the issue:
http://stackoverflow.com/questions/31919921/angularjs-1-4-3-ngrepeat-prints-variablename-instead-of-value-when-used-in

We are using:

{
    ...
    "angular": "1.3.1",
    "angular-translate": "2.4.2",
    "ui-route": "0.2.15",
    ...
}

And as @brauliodiez described we just got rid of the "undefined" by changing the way we are using translate,

from not working using:

<h1 translate>resetPassword.ChangePassword</h1>

to working with:

<h1>{{::'resetPassword.ChangePassword' | translate}}</h1>

We haven't used any monkey patch or hasn't removed 'use strict';

+1 on efficacy of @jacksonrayhamilton solution using Angular 1.3.16. Can also confirm that this problem basically breaks apps that use Angular Material.

@johgusta solution worked really well on our website, plus it looks much safer as it is not rewriting Angular internals.

I ran into this issue yesterday, got "readonly property" error. but it's very strange that this bug is not always appear. I use the same simulater & sourcecode in same mac air notebook, sometimes got error, sometimes no error at all.

Currently getting this error on iOS 8.4.1, angular 1.4.3. Only getting this on iPad mini.

@jacksonrayhamilton I went to try the utility but I'm a little clear on "create a transformed angular.webkitassign.js in the same directory". I'm not sure what I do there.

@alscheuring, in the future please file issues for webkit-assign on our Issues page.

webkit-assign provides a command-line interface. Open a terminal and do npm install -g webkit-assign to install the program. cd to the directory of a file you'd like to transform. Then type webkit-assign FILENAME.js (where "FILENAME.js" should be replaced with an actual filename), and the program will produce a fixed copy of the file in the same directory.

Many thanks to @jacksonrayhamilton's solution. Worked perfectly. I have used @jhunken's patch but it seemed to only reduce the frequency in which the error occurs (still seems to happen randomly).

@jacksonrayhamilton's solution is great. We're transforming angular.js with a custom webpack loader:

// webpackConfig.js (an excerpt)

{
  module: {
    loaders: [
      {
        test: /angular\.js$/,
        loader: path.join(__dirname, 'webpack/webkitAssignLoader')
      }
    ]
  }
}
// webkitAssignLoader.js

var webkitAssign = require('webkit-assign');

module.exports = function (source) {
  this.cacheable();
  return webkitAssign(source);
};

I published @Cinamonas' loader: https://www.npmjs.com/package/webkit-assign-loader

@johgusta @albertogasparin Which version of Angular are you guys using to claim that this solution (https://gist.github.com/johgusta/46fb1ecd459dbc3bfdfc) is working? This fix doesn't work for us with Angular-1.4.6.

@johgusta's solution solved my problem in angular 1.4.2

@johgusta's solution appears to have solved our issues in angular 1.4.5

+1, tried with 1.4.0, 1.4.6 same story. How I can intelligently patch Angular if I don't use webpack?

Note, while reports are that it only affects IOS8, I now have a case of it occurring on IOS9.2 (despite using webkit-assign fix). Any ideas?

TypeError: Attempted to assign to readonly property.
Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13C75 Safari/601.1

Will try removing 'use strict's once I have a device I can regularly test on.

@code-tree If you've run all JavaScript code on your site through webkit-assign and can still consistently reproduce that error, you should file a bug on our repository.

+1, angular 1.3.6 & 1.4.8, ios 8.2

@jacksonrayhamilton Retrying on a different friend's device running iOS 9.2 worked fine, so I can't reproduce it, but it did still occur on the device mentioned earlier (which I no longer have access to). So I guess I'll wait and see if anyone else reports anything.

Hello everyone,

I have also, unfortunately, ran into this issue.
I'm still a bit dazzled because of the behaviour:

  • I do not get it on every page in my application
  • I do not get it all the time on that specific page, only about 50% of the time

Does anyone noticed that it only happens with specific code or with loading issues?

I will look into the solution @jacksonrayhamilton provided, allthough I'm not sure if this will be usable for my final build.

Kind regards,

Yes, it first occurred for me after testing on a device for 30 minutes without any issues. All of a sudden it kept occurring on the index page, without anything being (noticeably) different to the previous 30 minutes...

Hello everyone,
I have noticed that it, for some reason, in my case seems to be related to the usage of ng-if's.
I use ng-if's to hide my pages until I have all my back-end calls done in order to make sure that all the data used by the directives is available before loading them.
Removing these ng-if's, it seems that I no longer get the readOnly errors (tested about 20 times).
Did anyone else noticed this?

Are there any negative side-effects for using @jacksonrayhamilton his solution? I am currently using angular 1.4.7.

@JeroenNelen While it's possible ngIf could be a culprit, I think it's more likely that the ngIf prevented or triggered some other code that was a culprit. As for the efficacy of the solution, we use an AST to transform and fix the code, so it should be pretty precise. We haven't had any problems using it in our production build and we have no open issues currently.

@jacksonrayhamilton Thanks for your reply. I will test to see if the issue still occurs after these changes, if it indeed occurs, I think the only solution will be to use your package (nice job on it by the way) :).
The weird thing is that I cannot get the error to occur on any other page, only on these specific pages, therefor I was meddling with the code on those pages to see if I could prevent the error locally (rather than adjusting anguluar.js).

@jacksonrayhamilton Hi, is there a way to use your tool with Grunt?

var webkitAssign = require('webkit-assign');
module.exports = function(grunt) {
  grunt.registerTask('webkitAssign', function() {
    var file = 'build/scripts.js';
    var code = grunt.file.read(file);
    var transformed = webkitAssign(code);
    grunt.file.write(file, transformed);
  });
};

Or for better integration, maybe you'd like to submit a plugin to our repository? :-)

We found a bug with angular-translate and ng-show on iOS8. removing ng-show in favour of ng-if fixes the issue. Also issue if parent has ng-show. ng-hide no doubt has an issue too!

@jacksonrayhamilton Thank you! Utility worked flawlessly. Problem is no longer persisting in iOS 8.3 / iPhone 5, AngularJS 1.4.9. Hours of headache later, you have made my day.

@spenoir I think you're talking about a different bug regarding ng-show / ng-hide:
https://github.com/angular/angular.js/issues/13380#issuecomment-181309484

I just encountered the same issue. Will try the webkit-assign fix and report back.

Since this is a bug in WebKit, which has been fixed, there is a work-around and we don't have a clear reproduction to investigate further, this is not actionable on our part.
Closing...

@code-tree i ran into the same issue with the same description (iOS 9, appearing after long usage time). How do you fix your app?

@celle886 No idea, sorry :)

It seems like webkit-assign helps, but I couldn't reliably reproduce the problem.

Just came across this issue in our web app with Angular 1.4.8 when using iPod/iPhone 8.4.1 on Safari 8.0. Thanks for whoever was first to suggest webkit-assign. We used webkit-assign/gulp and that solved a problem that has been ghosting/plaguing us for 6+ months.

I have this issue using Angular 2 (with Ionic 2) in the iPhone 6s / iOS 9.2 simulator. The message is "Exception: TypeError: Attempted to assign to readonly property" I've tried the @jacksonrayhamilton webkit-assign solution, but this does not seem to work with Angular 2 (I've tried in the final app.bundle.js file).

Someone have an ideia how to fix this problem?

Thanks!

@TiagoSilvaPereira Please open an issue about this on the https://github.com/angular/angular repo. This repo here is only for the 1.x branch

Thanks @Narretsz, i've solved this problem removing all "use strinct" from my code.

Was this page helpful?
0 / 5 - 0 ratings