Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Non-fatal errors not showing in Crashlytics

I was testing the non-fatal error functionality of Crashlytics and can't seem to get the recorded errors to appear in Crashlytics.

I did initialize Crashlytics in AppDelegate like this:

Fabric.with([Crashlytics.self])

And I test send error like this (the test code is in viewDidLoad method):

let error = NSError(domain: "myDomain", code: 1000, userInfo: nil)
Crashlytics.sharedInstance().recordError(error)

But nothing shows up in the analytics. I tried to:

  • Restart application
  • Disconnect from debugger and run the application several times
  • Add regular crash using Crashlytics.sharedInstance().crash(). In that case only the fatal crash is reported
  • I waited 4 days for the data to show up

enter image description here

Versions:

  • Crashlytics (3.8.5)
  • Fabric (1.6.12)

Thanks

like image 303
Tomáš Kohout Avatar asked Sep 06 '25 18:09

Tomáš Kohout


2 Answers

I found what was the problem:

The application code was embedded in a framework. My tip is that the non-fatal logs were saved in the framework's bundle not the main bundle. On the next start the main bundle was searched for logs but none was found, thus nothing was sent.

My solution was remove the app from framework as it was no longer needed in the project. I am not sure how this would be solved if you would need to keep the code in the framework.

like image 144
Tomáš Kohout Avatar answered Sep 08 '25 11:09

Tomáš Kohout


Run the script which uploads DSYMS to Firebase. Typically this script is not executed in debug mode - check the Build Phases tab. If you use such configuration just try in AdHoc build.

like image 32
Łukasz Gierałtowski Avatar answered Sep 08 '25 10:09

Łukasz Gierałtowski