RevenueCat/purchases-android

ANR crash from DeviceCache cleanupOldAttributionData

mikezliu opened this issue · 3 comments

Describe the bug
A clear and concise description of what the bug is. The more detail you can provide the faster our team will be able to triage and resolve the issue. Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.

  1. Environment

    1. Platform: Android
    2. SDK version: 5.6.5
    3. OS version: 12
    4. Android Studio version: Flamingo Canary 11
    5. How widespread is the issue. Percentage of devices affected.
      Some ANRs reported on small number of users
  2. Debug logs that reproduce the issue

  3. Steps to reproduce, with a description of expected vs. actual behavior

  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context

The following ANR is being reported:

main (runnable):tid=1 systid=32044
at java.util.HashMap.putMapEntries(HashMap.java:511)
at java.util.HashMap.(HashMap.java:489)
at android.app.SharedPreferencesImpl.getAll(SharedPreferencesImpl.java:293)
at com.revenuecat.purchases.common.caching.DeviceCache.cleanupOldAttributionData(DeviceCache.kt:164)
at com.revenuecat.purchases.identity.IdentityManager.configure(IdentityManager.kt:41)
at com.revenuecat.purchases.Purchases.(Purchases.kt:160)
at com.revenuecat.purchases.Purchases.(Purchases.kt:94)
at com.revenuecat.purchases.PurchasesFactory.createPurchases(PurchasesFactory.kt:88)
at com.revenuecat.purchases.Purchases$Companion.configure(Purchases.kt:2065)

👀 SDKONCALL-208 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

Hi, thanks for reaching out! We just released a fix for this in our latest version here https://github.com/RevenueCat/purchases-android/releases

This issue has been automatically locked due to no recent activity after it was closed. Please open a new issue for related reports.