Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Get app to exceed 'bad' thresholds for ANRs and crash rates #5649

Open
3 tasks
BenHenning opened this issue Jan 14, 2025 · 2 comments
Open
3 tasks
Assignees
Labels
enhancement End user-perceivable enhancements. Impact: High High perceived user impact (breaks a critical feature or blocks a release). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.

Comments

@BenHenning
Copy link
Member

BenHenning commented Jan 14, 2025

Is your feature request related to a problem? Please describe.

The Play Store sometimes will deprioritize apps in search results if they have user-perceived crashes and ANR rates that exceed predetermined thresholds by Google. The Oppia Android app currently exceeds these rates for both metrics.

Describe the solution you'd like

We need to reduce ANRs and crashes such that the app's crash threshold goes below the bad threshold. Here is the current situation:

Current rate (Play Console) Current rate (Firebase last 90 days) Expected rate threshold
Crashes 2.67% 2.87% <1.09%
ANRs 0.60% Unknown (not captured by Firebase) <0.47%

Describe alternatives you've considered

The alternative is not fixing these, which is actually fine while the app is in beta. However, as we approach global availability this becomes more important (especially after GA launch because then Oppia's searchability will directly relate to users' ability to find the app).

Additional context

Key crash clusters that should be fixed:

We will need to keep this issue open until we see a release that brings the rates back down. Also, if possible we should try to ensure fixes include regression tests to help prevent the crash returning in the future.

@BenHenning BenHenning added enhancement End user-perceivable enhancements. triage needed Impact: High High perceived user impact (breaks a critical feature or blocks a release). labels Jan 14, 2025
@BenHenning BenHenning pinned this issue Jan 14, 2025
@BenHenning BenHenning self-assigned this Jan 14, 2025
@BenHenning BenHenning added this to the 1.0 Global availability milestone Jan 14, 2025
@BenHenning
Copy link
Member Author

NB: making this a soft GA requirement since we will really want these fixed once we're in GA (it's not technically a blocker to prevent GA, but it could affect our ability to reach users once the app is in full production).

@adhiamboperes adhiamboperes added Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet. and removed triage needed labels Jan 16, 2025
@TanishMoral11
Copy link
Collaborator

Hey @BenHenning ,

I believe that addressing this issue is very important. As you mentioned, the Play Store deprioritizes the Oppia app if the app exceeds the user-perceived crash and ANR thresholds. This can significantly affect the app's visibility and popularity.

To resolve this, my goal is to reduce the crash rate and bring it below the predetermined thresholds set by Google. Based on the current situation, I've thought of the following steps to reduce crashes and ANRs:

Planned Changes:

  1. In app/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt:

    • Added exception handling in initializeFirebaseApp and initializeWorkManager methods to ensure exceptions are logged and handled gracefully.
    • Disabled WorkManager initialization for SDK 31+ due to compatibility issues.
    • Updated Firebase App Check initialization to use different providers for developer and production builds, ensuring better compatibility across environments.
  2. In app/src/main/AndroidManifest.xml:

    • Removed WorkManagerInitializer and InitializationProvider to prevent automatic initialization of WorkManager, which is not compatible with SDK 31+.
  3. In app/src/main/java/org/oppia/android/app/devoptions/RouteToViewEventLogsListener.kt:

    • Added exception handling in the routeToViewEventLogs method to log and handle exceptions effectively, improving overall stability.
  4. In app/src/main/java/org/oppia/android/app/application/ApplicationComponent.kt:

    • Added exception handling in the getWorkManagerConfiguration method to log and handle exceptions gracefully, preventing unexpected crashes.
  5. In app/src/main/java/org/oppia/android/app/application/ApplicationModule.kt:

    • Added exception handling in the provideWorkManagerConfiguration method to improve error handling and ensure the app runs smoothly under various conditions.

I believe these changes will help reduce crashes and improve the overall stability of the app. Could you please guide me on whether this approach is correct? And if possible, let me know if there are any additional measures I can take to further enhance the app's performance.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement End user-perceivable enhancements. Impact: High High perceived user impact (breaks a critical feature or blocks a release). Work: Medium The means to find the solution is clear, but it isn't at good-first-issue level yet.
Development

No branches or pull requests

3 participants