arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1k stars 1.55k forks source link

logError does nothing with Crashlytics #871

Closed herrskytte closed 2 months ago

herrskytte commented 5 years ago

The method logError does not log anything that is shown with Crashlytics. You can no longer see errors reported to Firebase Crash in Firebase, so this method is now useless.

However it would be very useful if we could use this method or a new one to report a non-fatal exception to Crashlytics as described here: https://firebase.google.com/docs/crashlytics/customize-crash-reports

StephanMeijer commented 5 years ago

Trying to trigger Crashlytics with throwing errors: impossible as well ...

tmvnk commented 5 years ago

Same issue here. "Trying to trigger Crashlytics with throwing errors"

briantq commented 5 years ago

@herrskytte @StephanMeijer @tmvnk Is it happening on both platforms or just one?

@herrskytte please use the bug template as it helps gather relevant information so we don't have to ask follow up questions :)

herrskytte commented 5 years ago

Sorry for poor bug reports. This is valid for both platforms using v 2.0.2 of the plugin.

To recreate, call logError("anything") on either platform. Observe that no errors are shown in Firebase console under Crashlytics

briantq commented 5 years ago

@herrskytte Thanks. I updated the bug report accordingly.

As far as resolving this issue, the cut over to Crashlytics was not as smooth as we had hoped. The submission was a community submission and it was not something we could easily test. With the fact that Firebase Crash was being sunsetted in a matter of days it was merged since FB Crash was not going to.

There are no full time developers, only community developers on the project so if someone who is affected can investigate, that would be the fastests way to resolve the issue. There is some information in the Contribution Guidelines that talks about where the code lives to help as a starting point.

If it flat out isn't working, hopefully it shouldn't be too hard to diagnose (JS call isn't calling native code [doubt this but should confirm], native code isn't calling the proper Crashlytics method [should be very easy to find in the code]).

sengoontoh commented 5 years ago

Anyone able to get error logging / stack trace to work with this plugin?

rahulecomp commented 5 years ago

It works for android for me. logError in android has Crashlytics.logException(e) implemented and that works . As far as IOS is considered crashalytics has CLSNSLog which might not be supported with the current Fabric SDK https://docs.fabric.io/apple/crashlytics/logged-errors.html So implementing it should solve the problem. screen shot 2018-11-06 at 2 44 00 pm

Just attaching a screenshot of android error which was acheived

sengoontoh commented 5 years ago

@rahulecomp The logError function doesn't seem to be documented. Do you have an example of how to use it? Do you just implement a GlobalErrorHandler provider and send the error into logError? Thanks!

therepo90 commented 5 years ago

logError is missing in documentation