Edit: It seems that this could be related to Chrome v43, I downgraded to v42 and everything works fine.
Edit: I've submitted an issue on the Angular's Github repo.
It seems that the error gets thrown by
return logFn.apply(console, args);
line 12221
in angular.js source.
Here's a link to the Chromium bug.
Any tips on what to do now?
I'm trying to migrate my app from AngularJS v1.2 to either v1.3 or v1.4 but I'm getting TypeError: Illegal invocation
on Chrome (tried win, osx and ubuntu).
The stack trace isn't really helping:
TypeError: Illegal invocation
at equals (angular.js:1034)
at equals (angular.js:1034)
at equals (angular.js:1034)
at equals (angular.js:1034)
at equals (angular.js:1034)
at Scope.$get.Scope.$digest (angular.js:15550)
at Scope.$get.Scope.$apply (angular.js:15824)
at done (angular.js:10263)
at completeRequest (angular.js:10435)
at XMLHttpRequest.requestLoaded (angular.js:10376)
So this seems something to do with AJAX requests, but I'm also getting:
TypeError: Illegal invocation
at equals (angular.js:1034)
at equals (angular.js:1034)
at equals (angular.js:1034)
at equals (angular.js:1034)
at equals (angular.js:1034)
at Scope.$get.Scope.$digest (angular.js:15550)
at Scope.$get.Scope.$apply (angular.js:15824)
at tick (angular.js:10983)
I'm using $interval
to update a model class (which is a factory and reflected in the views through setting the $scope.client
to this class):
var runTimer = function () {
self.timeOnline = time(self.timeSoFar);
self.timeSoFar = Date.now() / 1000 - self.alarmTriggeredTime;
};
$interval(runTimer, 1000);
I think there's an issue with $digest/$apply
. I've spent hours debugging this, but still haven't got a clue on what's happening.
Any pointers into further debugging is much appreciated.
42.0.2311.135
. – Ottiethis
set to window, undefined or something else then you will get that error. – Titanothereelement.bind('change', function(event){ var files = event.target.files; scope.$apply(function() { ngModel.$setViewValue(files); }); });
– Rheumatism$scope.myFun = window.history.back;
and there is a similar angular bug report – Victual