-
Notifications
You must be signed in to change notification settings - Fork 29
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
Initialize causing ANR when creating encrypted shared prefrences #760
Comments
@Ayyanchira thank you for your quick response and your explanation! We've been on version 3.5.1 for the two months and we see the issue intermittently (12 users in the last 30 days). This morning we had 31 events which triggered an error notification in our BugSnag Slack channel. But all of these events were from the same user. |
Will you be able to provide device detail on which the crash is occuring. We can try replicating it and see what exactly is happening. Iterable uses google's crypto library. |
@Ayyanchira here are the devices reporting the issue the last 30 days: moto g play - 2023 and all of these devices are either on Android 11 or Android 12 |
Same for me, all 100% of reportings comes from Android 12, SDK version is
|
We are having the same issue. The problem appears to be in the file IterableKeychain.kt. . In the constructor on line 38, you are calling EncryptedSharedPreferences.create(). The version of I believe that if you switched to this version of create(), then this issue would be resolved. Can you please comment here that you are aware of this issue and are willing to fix it? We have users where background threads report ANRs and eventually a crashed thread as a result of this. Thank you. |
Hi @randalleastland thanks for writing in. This does point out ambiguous variable name problem in SDK. Rest assured, SDK indeed uses the recommended approach which accepts MasterKey instead of String alias. And yes, the team is aware of the issue and is actively working towards a solution. |
Our users are experiencing ANR errors when Iterable is being initialized according to BugSnag reports:
The problem appears to be when the Iterable keychain is initialized and a call to
androidx.security.crypto.EncryptedSharedPreferences.create
is made. This is a bit confusing because we do not store in-app messages in memory, in other words we don't setsetUseInMemoryStorageForInApps(true)
we are simply just calling initialize with a default config:Should this Iterable keychain initialization be offloaded to a background thread? Also is there a reason why
EncryptedSharedPreferences.create
is called even though we don't use encrypted messages? ThanksThe text was updated successfully, but these errors were encountered: