I have setup Crashlytics and I know it works, as I have had reports in the past. However more recently, I am getting no crash reports despite numerous crashes on different devices.
It says I have 76% crash-free users, yet no crashes to work out where the other 24% is coming from.
Is there something that I need to do to catch all errors, or should it be automatic?
For more information, I have the following init/error handling:
const errorHandler: traceModule.ErrorHandler = {
handlerError(err) {
firebase.crashlytics.sendCrashLog(err);
}
}
application.on(application.uncaughtErrorEvent, (args) => {
if (application.ios) {
firebase.crashlytics.sendCrashLog(args.error);
}
})
traceModule.setErrorHandler(errorHandler);
I'm also unable to get anything to show up in the Crashlytics dashboard. The documentation is incredibly limited. No mention of proper setup or best practices in regards to capture (I still don't know if the app is supposed to automatically capture and log crashes or if i should be implementing some global error handler). No warning that apparently NativeScript, Angular, Android, and IOS all have their own exceptions and you never know where you're going to get each one. I still don't even know if its possible to both log and suppress an exception, because the ONLY place I've been able to access a native exception is in application.on(application.uncaughtErrorEvent, ....), and by that point the app is already dead. Using an angular global error handler lets me catch errors, but doesn't give me access to native exceptions, which is apparently the only thing this plugin is able to log.
@brandon-sigao The reason the documentation is limited is because I'm not entirely sure how, what, and when exceptions are exactly reported. Things have changed for better and worse during various releases of the native Firebase SDKs, so it's not easy for me either to know what's what. If you have any constructive insights or suggestions then I'm all ears as usual.
@EddyVerbruggen first off sorry for the frustration. I've been at this for roughly 5 days now, under a fairly strict deadline, and still haven't managed to get a single thing logged to crashlytics. I realize you're doing the best you can to keep up with firebase.
As far as suggestions, the current "sendCrashLog" takes an argument of type "any" and doesn't have a success callback. This means its extremely difficult to figure out where the fault lies. I don't know if any of my calls successfully making it to crashlytics, or if my config file is wrong, or what. I'm pretty certain i was throwing Angular exceptions into it for a while there. When I run that method I just know "something" happens, and 24 hours later I find out it never worked. If I could have some console logs telling me that my object type is wrong, or that it failed to submit the log, that would be fantastic.
Documentation wise, could you clarify the intended usage so we know if we're at fault or not? It says to simply produce a crash, implying that the plugin automatically detects them, but then immediately gives an example of manually sending them. I'm not sure which it is. Also it says that properties are logged "with an error", but no explanation of what that means. I'd expect some sort of ID to tie it to an error, but there isn't. So you just log them at the same time as the error and it somehow knows that they're tied together? Some clarification would great.
Again, sorry for the pissy reply, I'm just running out of time and completely out of ideas on how to get anything to work.
That's why I've gone down the method of manually catching errors and doing sendCrashLog, yet it still doesn't show up in the dashboard.
@EddyVerbruggen
Not a expert , can this be issue with Xcode 10 only ?
As per Firebase official documents Xcode 10 require specially settings
Xcode 10 only: Add your app's built Info.plist location to the Build Phase's Input Files field:
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
This setting is not done in scripts/postinstallation.js
I am testing out with manually adding it in Xcode project file
@EddyVerbruggen
I can confirm that it is Xcode 10 only issue, After adding step suggested by official documents manually crash report started appearing in firebase console.
postinstallation.js should be modified to include inputPaths as suggested in document
@milansar Interesting! Any idea where exactly? If you know, please file a PR :)
@EddyVerbruggen created PR
Awesome, thanks!
Most helpful comment
For more information, I have the following init/error handling: