FabricPlugin icon indicating copy to clipboard operation
FabricPlugin copied to clipboard

Bug in the code on fabricplugin.crashlytics.js on line 37

Open Thomasbehan opened this issue 5 years ago • 7 comments

TypeError: trace[Symbol.iterator] is not a function at FabricCrashlytics.sendNonFatalCrash (FabricPlugin.Crashlytics.js:37)

Thomasbehan avatar Sep 05 '18 15:09 Thomasbehan

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?

uniphonic avatar Sep 13 '18 19:09 uniphonic

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 avatar Sep 14 '18 12:09 Thomasbehan

@Thomasbehan how did you fix?

vendramini avatar Nov 30 '18 16:11 vendramini

use stacktrace.js to process your errors then send them to fabric/firebase https://www.stacktracejs.com/

Thomasbehan avatar Nov 30 '18 16:11 Thomasbehan

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.

vendramini avatar Nov 30 '18 16:11 vendramini

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

Thomasbehan avatar Nov 30 '18 16:11 Thomasbehan

I'll try it next week, then I come back here to tell if everything went well.

Thank you.

vendramini avatar Nov 30 '18 20:11 vendramini