Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase sendUnsentReports() sends exceptions only after restart

I want to send info about user non-fatal exceptions through recordException() method, but default crashlytics implementation sends them only after app is restarted (which is quite a strange behaviour o_O)

I tried to disable automatic reports collection through setCrashlyticsCollectionEnabled(false) method and send them manually through sendUnsentReports(), but, alas, firebase continues to send them only after the app is restarted.

Has anybody solved that kind of a problem and how?

like image 690
blinker Avatar asked Jun 16 '20 13:06

blinker


1 Answers

Yes, that’s expected. Logged exceptions are not sent immediately when they are recorded, otherwise there would be pull requests at random intervals which would use up a lot of bandwidth and battery.

They are batched and sent either on startup or at crash time, and when you call sendUnsentReports, all cached reports are sent at that time, but it doesn’t send anything from the current session.

like image 142
Oleg Kodysh Avatar answered Oct 24 '22 14:10

Oleg Kodysh