Strava Oct 18, 2022

Conquering Our Android Crash Count

Article Summary

Strava thought they had a few hundred crashes per day. Crashlytics revealed they were missing 42,000 crashes per week.

The Strava Android team integrated Crashlytics crash reporting and discovered their app stability was far worse than Google Play Store metrics suggested. This is their journey from 5% of users experiencing daily crashes down to less than 1%.

Key Takeaways

Critical Insight

By implementing proper crash reporting and systematically fixing the top offenders, Strava reduced their Android crash rate from 5% to under 1% of daily users in just 10 weeks.

The footnote reveals why using largeHeap is actually the right call despite Android documentation discouraging it, and it's not the reason you'd expect.

About This Article

Problem

Strava's Android app kept crashing with IllegalStateException errors from the Text-to-Speech system. In the first week of version 4.1.6, there were 20,000 of these crashes. The team also found fragment state loss and asynchronous receiver issues, but Google Play Store metrics weren't picking them up.

Solution

The team logged the TTS exception and fixed the underlying problems in version 4.1.7. They added fragment attachment checks before calling Fragment#getActivity() and patched fragment state loss bugs in the most-used Activities.

Impact

Version 4.1.7 cut crashes by 55% in the first three days. Daily weekday crashes dropped from 7,000 to 3,000. This meant 6,000 to 8,000 more daily user sessions that didn't end in a crash.