4

I'm using the Crashlytics.logException() method when I want to programmatically report a non-fatal error on Crashlytics.

Although I set up a valid identifier for the current logged user when the application starts, with Crashlytics.setUserName(), I can't see this information in the dashboard. Instead, it appears only when there is a crash (see picture).

enter image description here

How can I enable it for non-fatal errors too?

EDIT: I'm using Crashlytics plugin for Eclipse, 1.7.0

TheUnexpected
  • 3,077
  • 6
  • 32
  • 62

2 Answers2

4

The username info will appear at non-fatal crashes too. Can you please check if the call to Crashlytics.setUsername() is being done before the Crashlytics.logException()?

See the screenshot below:

screenshot

However, the logging of messages are currently not synchronously, so if the crash occurs quickly, all or none of these statements can make it over. The writing of the data is done in a background thread, so the crash that is processing will always trump the other thread, so in this case, the crash will always trump when the log is bring written even though it might've started up first.

Cipriani
  • 1,870
  • 14
  • 15
  • I call `setUserName()` right after the user is initialized, at startup. Obviously, `logException()` might be called later unexpectedly, but I assume that the information about the user have not been forgotten by Crashlytics. – TheUnexpected Oct 29 '14 at 13:59
  • thanks for pointing this, I edited the answer with an explanation – Cipriani Oct 29 '14 at 17:06
  • Thanks but this doesn't explain very much the cause of my problem, because between `setUserName()` and the call to `logException()` may pass, for example, 2 minutes. It's certainly a reasonable time... but the information is still not present in the report! – TheUnexpected Oct 29 '14 at 18:59
4

I solved this simply by updating the Crashlytics library.

I still had the 1.7.0 version, without Fabric. I upgraded the account and I downloaded the new 2.0 package using the new guide and now I can see the user's information in all the non-fatal errors.

TheUnexpected
  • 3,077
  • 6
  • 32
  • 62