I use nativescript with angular, and I can't get any result in my crash reporting tab !
I have selected "yes" during plugin installation to use report crashing.
I have also tried to send manualy error to crash reporting by using :
firebase.sendCrashLog({message : "test", showInConsole : true}).then(......
But it sends nothing to the console too.
Is it still working for you guys ??
I think your right. @EddyVerbruggen I don't see any call to FirebaseCrash.report in source, only FirebaseCrash.log which by the documentation will only add this log on subsequent crash report.
I couldn't make it work too, my Firebase crash console is always empty. I think it's not fully supported right now. There's no documentation about it on the plugin documentation, and the sample application doesn't have it implemented too.
By changing the following line of code below, the firebase / crash reporting record was displayed.
firebase.sendCrashLog = function (arg) {
return new Promise(function (resolve, reject) {
try {
if (typeof(com.google.firebase.crash) === "undefined") {
reject("Make sure firebase-crash is in the plugin's include.gradle");
return;
}
if (!arg.message) {
reject("The mandatory 'message' argument is missing");
return;
}
// com.google.firebase.crash.FirebaseCrash.log(arg.message);
//crash log display ok
var exception = new android.util.AndroidException(arg.message);
com.google.firebase.crash.FirebaseCrash.report(exception);
//crash log display ok
resolve();
} catch (ex) {
console.log("Error in firebase.sendCrashLog: " + ex);
reject(ex);
}
});
};
@fcostaprojects Thanks for your suggestion, I will try that. @rbasniak @GrEg00z @SBD580 are you all reporting this for Android only, or iOS as well?
My personal experience is that it doesn't seem to do much on either platform, but for Android that may change because of @fcostaprojects's tip.
Android only but since 20 of march, I receive automatic crash report to firebase.
I didn't re-try firebase.sendCrashLog but the last month it was the problem
@EddyVerbruggen Android only... I decided to use Fabric plugin instead for crashing report. But I'll give a try on @fcostaprojects tip to see if it works.
I'm getting "Make sure 'Firebase/Crash' is in the plugin's Podfile - and if it is there's currently a problem with this Pod which is outside out span of control :(" ; This is happening on iOS emulator and device.
The podfile looks like:
use_frameworks!
firebase/platforms/ios/Podfile
pod 'Firebase', '~> 3.13.0'
pod 'Firebase/Crash'
end
@rbasniak Were you able to get nativescript-fabric plugin to work with an iOS build?
Any update on this?
Coincidence or not, @fcostaprojects's suggestion made the crash report appears (I'm working with Android only).
Has there been any progress on this?
It's working fine on iOS but not for Android. Using latest version v4.1.2.
I have also attempted @fcostaprojects changes but that doesn't seem to do anything for me.
Here are my debug logs from adb that reference FA:
10-24 11:15:16.477: I/FirebaseCrashApiImpl(12332): FirebaseCrashApiImpl created by ClassLoader t[DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000003d/DynamiteModulesC_GmsCore_prodmnc_alldpi_release.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000003d/n/armeabi-v7a, /data/user_de/0/com.google.android.gms/app_chimera/m/0000003d/n/armeabi, /system/lib, /vendor/lib]]]
10-24 11:15:16.477: I/FirebaseCrash(12332): FirebaseCrash reporting loaded - com.google.android.gms.internal.zzdmq@ffe9282
10-24 11:15:16.528: I/FirebaseCrashApiImpl(12332): FirebaseCrash reporting API initialized
10-24 11:15:16.529: I/FirebaseCrash(12332): FirebaseCrash reporting initialized com.google.android.gms.internal.zzdmq@ffe9282
10-24 11:15:16.530: D/FirebaseCrash(12332): Firebase Analytics Listener for Firebase Crash is initialized
10-24 11:15:21.931: D/FA(12332): Connected to remote service
10-24 11:15:21.931: V/FA(12332): Processing queued up service tasks: 8
10-24 11:15:26.666: I/FirebaseCrash(12332): Sending crashes
10-24 11:15:27.072: V/FA(12332): Inactivity, disconnecting from the service
@travtarr If those changes are really applied to your project folder then I have no clue how I can help you.
I'm a bit puzzled by why @fcostaprojects's change works actually; the documentation of FirebaseCrash.log says it accepts a String, not an AndroidException. The plugin uses a String, but I'm reading here that AndroidException actually works. 馃槚
@EddyVerbruggen I have attempted with and without those changes.
Currently I don't have any changes to your code and it's not working even though it shows all indication that it is working via adb's logs. It seems like it may be an issue with the Firebase SDK or how {N} deals with crashes.
@travtarr Yeah, I'm not sure I can be of much help as indeed those logs look fine. There's also no mention of changes to Crash reporting in newer Firebase Android SDK versions so don't expect a newer version of the plugin to suddenly solve it. 馃槙
@EddyVerbruggen So if I manually called the FirebaseCrash.report() function from the SDK it logged the crash just fine in the Firebase console.
To get the automatic crash reporting to work within the SDK I had to figure out a way to completely crash the app so that it gives the standard Android App has stopped dialog instead of the stack trace window. That stack trace window apparently catches any exception caused in {N} and thus prevents the SDK from recognizing that the app actually crashed.
Edit: It appears that activity can't be disabled from debug builds to properly test this: https://github.com/NativeScript/NativeScript/issues/3208
Please update to 5.3.0 and give Crashlytics a try. See https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/docs/CRASHREPORTING.md
Most helpful comment
I couldn't make it work too, my Firebase crash console is always empty. I think it's not fully supported right now. There's no documentation about it on the plugin documentation, and the sample application doesn't have it implemented too.