FirebaseExtended / angularfire

AngularJS bindings for Firebase
MIT License
2.73k stars 632 forks source link

New Console Error "TypeError: v12 is not a function" With Version 0.9.2 #984

Closed pihish closed 4 years ago

pihish commented 5 years ago

I have an application which was written several years ago using AngularJS 1.5.5, Firebase 2.2.3, and AngularFire 0.9.2.

In the past few days, I've noticed the following console error when I load the page:

angular.js:13550 TypeError: v12 is not a function
    at fn (eval at compile (angular.js:14432), <anonymous>:4:213)
    at checkMetaVars (angularfire.js:1414)
    at Scope.$digest (angular.js:17064)
    at Scope.$apply (angular.js:17337)
    at angular.js:19166
    at completeOutstandingRequest (angular.js:5869)
    at angular.js:6145

This seems correlated to a filtering feature on the app which has also stopped working. The codebase for this application has not changed in several years so it seems this is being caused by something on the back-end that is causing an error to occur when running AngularFire.

I went through the version history for AngularFire and noticed that the next release after 0.9.2 is 1.0.0 - and this update has several breaking changes. I would like to avoid having to update to a newer version of AngularFire because of this.

Any idea what may be causing this?

pihish commented 5 years ago

I did a little bit more digging and it seems to be related to the $bindTo() method. I use this method in several places in my JS script, but there is only one usage instance that is causing the above error to occur. The places where it is used and it is only called once seems to work fine.

The call that is causing the error to appear is called about 50 times in a row - the underlying application is a chat application and I use the $bindTo() method to establish a three-way binding to tell the user as to whether certain conversations have been seen.

Maybe there is some sort of throttling going on at the back-end now where if I try to establish too many persistent connections with $bindTo(), it will error out?