Skip to content

AEADBadTagException when calling getStorage #121

@guy-utila

Description

@guy-utila

Hi,

I am getting the following exception when calling getStorage on some Android device. Could this be because of an added fingerprint? If so, how should I handle this?

PlatformException: PlatformException(Unexpected Error, null, javax.crypto.AEADBadTagException
javax.crypto.AEADBadTagException
at android.security.keystore2.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:632)
at javax.crypto.Cipher.doFinal(Cipher.java:2114)
at xa.l.a(CryptographyManager.kt:49)
at xa.d.l(BiometricStorageFile.kt:44)
at xa.f$m$a.a(BiometricStoragePlugin.kt:20)
at xa.f$m$a.invoke(BiometricStoragePlugin.kt:5)
at xa.f.r(BiometricStoragePlugin.kt:54)
at xa.f.h(BiometricStoragePlugin.kt:1)
at xa.f$m.a(BiometricStoragePlugin.kt:28)
at xa.f$m.invoke(BiometricStoragePlugin.kt:3)
at xa.f.u(BiometricStoragePlugin.kt:17)
at xa.f.b(BiometricStoragePlugin.kt:160)
at ub.j$a.a(MethodChannel.java:18)
at ib.c.l(DartMessenger.java:19)
at ib.c.m(DartMessenger.java:42)
at ib.c.i(Unknown Source:0)
at ib.b.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: android.security.KeyStoreException: Signature/MAC verification failed (internal Keystore code: -30 message: system/security/keystore2/src/operation.rs:850: KeystoreOperation::finish

Caused by:
0: system/security/keystore2/src/operation.rs:426: Finish failed.
1: Error::Km(r#VERIFICATION_FAILED)) (public error code: 10 internal Keystore code: -30)
at android.security.KeyStore2.getKeyStoreException(KeyStore2.java:435)
at android.security.KeyStoreOperation.handleExceptions(KeyStoreOperation.java:78)
at android.security.KeyStoreOperation.finish(KeyStoreOperation.java:128)
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:624)
... 24 more
, null)
#0 StandardMethodCodec.decodeEnvelope (/opt/hostedtoolcache/flutter/stable-3.22.2-x64/packages/flutter/lib/src/services/message_codecs.dart:648)
#1 MethodChannel._invokeMethod (/opt/hostedtoolcache/flutter/stable-3.22.2-x64/packages/flutter/lib/src/services/platform_channel.dart:334)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions