tandibar/ng-rollbar

$window.Rollbar.error is not a function

hrangel opened this issue · 1 comments

Hey guys,
I'm trying to integrate Rollbar with IONIC, I've added ng-rollbar but skipped adding the native errors plugin for rollbar (https://github.com/emilyemorehouse/cordova-plugins-rollbar)

I was following this tutorial here: https://rollbar.com/blog/rollbar-integration-for-ionic/

The thing is, from time to time I receive a error report with the following details:

TypeError: c.Rollbar.error is not a function. (In 'c.Rollbar.error(d,{cause:e},function(a,c){var e=b.get("$rootScope");e.$emit("rollbar:exception",{exception:d,err:a,data:c.result})})', 'c.Rollbar.error' is undefined)

I already tried searching in and nothing seems to point me to the proper direction to fix this error, I've looked at the source code and figured out that c.Rollbar.error is actually $window.Rollbar.error, but I could't figure out why it is throwing that (and why on earth it is even report that erro through Rollbar since it says it is not loaded!!)

Glad if anyone can help!

I just updated to version 2.3.1. Could you please check if this issue still exists?