readrops / Readrops

Android multi-services RSS client
GNU General Public License v3.0
304 stars 21 forks source link

[Bug] Crash on opening #224

Open Shinokuni opened 6 days ago

Shinokuni commented 6 days ago

After wiping app data, uninstalling and installing app I get:

org.koin.core.error.InstanceCreationException: Could not create instance for '[Singleton:'android.content.SharedPreferences']'
    at org.koin.core.instance.InstanceFactory.create(SourceFile:185)
    at org.koin.core.instance.SingleInstanceFactory.create(SourceFile:5)
    at org.koin.core.instance.SingleInstanceFactory.get(SourceFile:7)
    at org.koin.core.scope.Scope.resolveInstance(SourceFile:109)
    at org.koin.core.scope.Scope.get(SourceFile:127)
    at com.readrops.app.MainActivity$onCreate$1.invokeSuspend(SourceFile:68)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:96)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(SourceFile:141)
    at kotlinx.coroutines.JobKt.runBlocking(SourceFile:102)
    at com.readrops.app.MainActivity.onCreate(SourceFile:32)
    at android.app.Activity.performCreate(Activity.java:8960)
    at android.app.Activity.performCreate(Activity.java:8938)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1526)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3975)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4173)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114)
    at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:231)
    at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:152)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: javax.crypto.AEADBadTagException
    at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:634)
    at javax.crypto.Cipher.doFinal(Cipher.java:2132)
    at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.decryptInternal(Unknown Source:27)
    at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.decrypt(SourceFile:6)
    at coil.network.RealNetworkObserver.read(SourceFile:42)
    at androidx.appcompat.widget.TooltipPopup.readMasterkeyDecryptAndParseKeyset(SourceFile:31)
    at androidx.appcompat.widget.TooltipPopup.build(SourceFile:63)
    at com.readrops.db.DbModuleKt$$ExternalSyntheticLambda0.invoke(SourceFile:512)
    at org.koin.core.instance.InstanceFactory.create(SourceFile:48)
    ... 27 more
Caused by: android.security.KeyStoreException: Signature/MAC verification failed (internal Keystore code: -30 message: system/security/keystore2/src/operation.rs:852: KeystoreOperation::finish

Caused by:
    0: system/security/keystore2/src/operation.rs:428: Finish failed.
    1: Error::Km(r#VERIFICATION_FAILED)) (public error code: 10 internal Keystore code: -30)
    at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:416)
    at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:79)
    at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:132)
    at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer$MainDataStream.finish(KeyStoreCryptoOperationChunkedStreamer.java:228)
    at android.security.keystore2.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:181)
    at android.security.keystore2.AndroidKeyStoreAuthenticatedAESCipherSpi$BufferAllOutputUntilDoFinalStreamer.doFinal(AndroidKeyStoreAuthenticatedAESCipherSpi.java:396)
    at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:626)
    ... 35 more

Does it mean android is not deleting something?

Originally posted by @iamnimnul in https://github.com/readrops/Readrops/issues/214#issuecomment-2450348727

sevmonster commented 3 days ago

Modern Android versions have started implementing app "archiving" which saves app data for the next time you reinstall, possibly even after clearing storage. Not sure how exactly you would check that. Need more info from @iamnimnul.