FabricPlugin
FabricPlugin copied to clipboard
Bug in the code on fabricplugin.crashlytics.js on line 37
TypeError: trace[Symbol.iterator] is not a function at FabricCrashlytics.sendNonFatalCrash (FabricPlugin.Crashlytics.js:37)
I too am seeing an issue with .sendNonFatalCrash , but I'm not seeing that error message. Can you give any steps to reproduce it? Also, what platform are you seeing this on?
I got around this because im using angularjs i was able to setup stacktrace.js in a way that i could process the stacktrace.js responses to get the expected stack. my main reason for this is wanting crashlytics to group different errors based off the stacktrace rather than reporting line 120 of the fabricplugin.js file everytime allows for better tracking of individual issues i also log before throwing an error which can provide more context as to what the user was trying to do.
I just think that this should be documented in this plugin or a function in the plugin could do the processing of the stacktrace.js function if its not the expected stack
@Thomasbehan how did you fix?
use stacktrace.js to process your errors then send them to fabric/firebase https://www.stacktracejs.com/
In my case, I'm using with ionic/cordova to build an app. When I try to get user's current location and for some reason there's an error, I just call window['fabric'].Crashlytics.sendNonFatalCrash("GPS error", error);
where the parameter error
came from a promise .catch(error)
.
I can't figure out what's happening.
ah i see so in your case youll need to npm install stacktracejs or a similar library and run the following code
StackTrace.fromError(error).then(function (stackframes) { window['fabric'].Crashlytics.sendNonFatalCrash("GPS error", stackframes); });
the plugin needs a stacktrace to work properly
I'll try it next week, then I come back here to tell if everything went well.
Thank you.