[Bug] ANRs Persist in Database Without Expiry
Describe the bug
ANR (Application Not Responding) reports are stored in the database, and while the most recent one is sent to the backend and removed, older ANRs that exist within the 3-hour window may remain in the database indefinitely. This could cause outdated ANRs to persist without proper cleanup, affecting app performance and database management.
How to Reproduce
- Trigger multiple ANRs within the app.
- The most recent ANR is sent to the backend and removed from the database.
- ANRs older than the most recent one remain stored.
- After 3 hours, observe that older ANRs are still in the database.
Expected behavior
The ANRs should either be cleared from the database after a set time window (3 hours in this case) or there should be a mechanism to regularly purge outdated ANRs to prevent them from persisting unnecessarily.
We can use DatabaseCleanupObserver
Environment
All app versions.
Thank you for opening an Issue in our Repository. The issue has been forwarded to the team and we'll follow up as soon as we have time to investigate. As stated in our Contribution Guidelines, requests for feedback should be addressed via the Feedback section in the Android app.
Thanks for reporting this issue. We've added it to out backlog so we can investigate and address it.