Bug P2
Status Update
Comments
is...@google.com <is...@google.com>
sr...@adobe.com <sr...@adobe.com> #2
I am not sure I understand the use case. how can the benchmark be code to real world scenario when it's not possible to do right now ? which scenario is it ?
In any case, since this would be for benchmarking, this would clearly not be available through the public DSL. We should find a semi-private way of doing this (maybe the private variant API object could offer that functionality for instance or a property).
Description
Version used: androidx.security:security-crypto:1.0.0
Devices/Android versions reproduced on:
Devices - OnePlus, Oppo, Realme, Samsung etc
Android versions - 10, 11, 12, 13, 14
Hi Team,
We are recently observing a NPE crash thrown by MasterKeys.getOrCreate(..) in the androidx/security/crypto/MasterKeys.java. This is a legacy code and we didn't observe any such crash earlier. It seems the method above has started to throw NullPointerException. Other apps in our ecosystem are also facing the same crash.
Trends (last 5 days): 4.29K events affecting 580 users
Issue visibility: 99.1% foreground
Stack trace:
Exception java.lang.RuntimeException: Unable to create application com.a.r.ProdApp: java.lang.NullPointerException: Attempt to invoke interface method 'android.os.IBinder android.system.keystore2.IKeystoreService.asBinder()' on a null object reference
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7601)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2428)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:257)
at android.os.Looper.loop (Looper.java:368)
at android.app.ActivityThread.main (ActivityThread.java:8839)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1049)
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'android.os.IBinder android.system.keystore2.IKeystoreService.asBinder()' on a null object reference
at android.security.KeyStore2.getService (KeyStore2.java:145)
at android.security.KeyStore2.handleRemoteExceptionWithRetry (KeyStore2.java:106)
at android.security.KeyStore2.getKeyEntry (KeyStore2.java:262)
at android.security.keystore2.AndroidKeyStoreSpi.getKeyMetadata (AndroidKeyStoreSpi.java:166)
at android.security.keystore2.AndroidKeyStoreSpi.engineContainsAlias (AndroidKeyStoreSpi.java:1074)
at java.security.KeyStore.containsAlias (KeyStore.java:1314)
at androidx.security.crypto.MasterKeys.keyExists (MasterKeys.java)
at androidx.security.crypto.MasterKeys.getOrCreate (MasterKeys.java)
at com.a.c.f.i.a.AuthKeychain.createEncryptedSharedPreferences (AuthKeychain.java)
It is a repetitive crash and we are observing a significant spike in the number of crashes. Please get it fixed at the earliest.
Thanks.