Open lmorda opened 4 months ago
Thank you for sharing the logs @lmorda !
SDK stores Email/ UserId Android's Encrypted Shared Preference over Regular shared preference starting 3.4.10 and hence the usage of Encrypted Shared Preferences.
Can you share which version of SDK is being used in the app?
@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. Crypto has been getting updates over recent years focussing on crashes on the device, however, the issue - still remains open: https://issuetracker.google.com/issues/176215143?pli=1
@Ayyanchira here are the devices reporting the issue the last 30 days:
moto g play - 2023 REVVL V+ 5G TCL Stylus 5G (T779W) moto g power (2022) K92 (LM-K920) LG G8 ThinQ™ (LM-G820) Nokia 7.2 U668AA moto g stylus 5G motorola one 5G UW ace
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 3.5.3
device manufacturers are:
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 create()
that you are using is deprecated. The Google documentation clearly says that this method is not thread safe.
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. masterKeyAlias
variable name may have caused the confusion, suggesting the use of a deprecated method.
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? Thanks