Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Thomasbehan opened this issue Sep 5, 2018 · 7 comments
Open

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

Thomasbehan opened this issue Sep 5, 2018 · 7 comments

Comments

@Thomasbehan
Copy link

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

@uniphonic
Copy link

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?

@Thomasbehan
Copy link
Author

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

@vendramini
Copy link

@Thomasbehan how did you fix?

@Thomasbehan
Copy link
Author

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

@vendramini
Copy link

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.

@Thomasbehan
Copy link
Author

Thomasbehan commented Nov 30, 2018

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

@vendramini
Copy link

vendramini commented Nov 30, 2018

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

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants