Closed AndroidDeveloperLB closed 1 year ago
Yes I also facing the same issue
You can check logs here.
2022-08-02 10:52:12.016 25975-25975/com.akaita.encryptedsharedpreferences I/AndroidKeysetManager: keyset not found, will generate a new one
java.io.FileNotFoundException: can't read keyset; the pref value __androidx_security_crypto_encrypted_prefs_value_keyset__ does not exist
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.readPref(SharedPrefKeysetReader.java:71)
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.readEncrypted(SharedPrefKeysetReader.java:89)
at com.google.crypto.tink.KeysetHandle.read(KeysetHandle.java:116)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.read(AndroidKeysetManager.java:311)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewKeyset(AndroidKeysetManager.java:287)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:238)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:160)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:120)
I think this issue was addressed in https://github.com/google/tink/commit/3c5b2a887c8d13529c33ca28c196a7fc55825032, where the stack trace was replaced with a simple log message.
I'll leave it as it is for now, at least until https://github.com/google/tink/issues/535 is resolved.
Yes it was removed recently. Sadly not sure about the rare exceptions , though
I changed my mind. I think this log message is more confusing than helpful. Let's remove it completely.
@juergw Wasn't it removed? Please check.
I think it will still log by default, according to what https://developer.android.com/reference/android/util/Log.html#isLoggable(java.lang.String,%20int) says. So I will change it to "verbose", so the logging is turned off by default, and the user can still turn it on if they want to.
@juergw Please check on latest version.
Yes, the lastest version of jetpack (https://developer.android.com/jetpack/androidx/releases/security#1.1.0-alpha04) says that the log message was removed, and references b/185219606. Which is marked as fixed. But I don't see what was changed.
I've now changed the logging to only log in verbose mode, https://github.com/google/tink/commit/cb67a3a9e3acce588cb00f7b2da384be1d48290a.
I was told to create a request about this here: https://issuetracker.google.com/issues/185219606