-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Illegal Invocation Error on Chrome 43.x and angular.js >= 1.3 #12004
Comments
Using Chrome 43.0.2357.81 OS X 10.10. The following works from the console (function() {
"use strict";
console.log.apply(console, ['hello']);
}()) Also tried many of the variations and all work. The bug that you point to talks about Do you have anything installed that would fiddle with |
I am having this same issue on OSX 10.9 but not on OSX 10.10. |
I had a similar issue with the
The exact same code works in Chrome 42. |
On Chrome 43, the following part in angular.copy(>=1.3.0) seems to be illegal for some prototypes such as SVGMatrix, VTTCue.
|
I think there is nothing actionable here. |
i get that this seems not the be angular's responsibility, however my apps don't work any more and I need a solution because my clients are unhappy. So let's fix this. |
when i read #8353, which more similar problem to me. |
@brutalcrozt, it's not possible to say what's wrong (or how to fix it), without a reproduction. |
Thanks for asking, i just wondering when open issue just lead to no where. |
Oddly I solved a similar error by prefixing my property with a dollar sign. I was trying to use a directive to populate a scope variable's property for use outside of the directive. I was originally using '_file' and got this error (and googled my way to here). Changing it to $file meant it worked for my purposes. I took the guess on the basis that angular doesn't copy internal variables around.
I had to use a deep watched isolated scope variable in the directive. There seems to be a number of different use cases above and mine isn't particular similar to any but I thought this may be of use to others. |
I'm upgrading to angular 1.3.20. I spot exactly the same problem. I have a directive that allows user to upload images. The Illegal Invocation Error is thrown when I try to add File object to the collection:
The error is thrown from angular equals method from this line:
In Firefox different error is thrown:
Sure enough, changing these lines in my code helps with this issue:
because Angular will not try to compare file any more:
|
Closing as the original issues seems to be invalid (or fixed by browsers). Subsequent comments about calling |
Thank you @Olgagr. |
I had the same error, when I was deep watching $http.pendingRequests and uploading files with ng-file-upload. Changing the watch to $http.pendingRequest.length solved it. |
There's an open issue: angular/angular.js#12004 this fix was taken from angular/angular.js#11665
There is an issue with angular trying to call console.log.
I've drilled it down to line 12221 which is:
return logFn.apply(console, args); in consoleLog function.
Seems like Chrome does not allow calling apply on the console object.
Chromium bug report.
Webkit bug report.
More info with my original question is here:
http://stackoverflow.com/questions/30578722/typeerror-illegal-invocation-when-trying-to-upgrade-from-v1-2
The text was updated successfully, but these errors were encountered: