-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformException(Exception encountered, read, javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT #248
Comments
Facing same issue |
Closing this as duplicate of #210 |
Why close this issue as a duplicate of a CLOSED issue when the problem is still ongoing and not fixed? |
My bad, i thought it was open. |
Hey, how's this issue going? I'm facing the issue and have not found any fix or workaround yet! |
@nombrekeff adding custom backup rules fixed the error for me:
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="FlutterSecureStorage"/>
</full-backup-content> see also https://pub.dev/packages/flutter_secure_storage#configure-android-version and https://developer.android.com/guide/topics/data/autobackup#IncludingFiles |
@dakr0013 thanks, I will try that! I've seen this solution a lot, so everything points that it works! |
The solution @dakr0013 told me did not work for me, I'm still facing the issue. Any updates on this? |
I temporary fixed. First, readAll always throws exception. So use read only. And when a key doesn't exist (or no data exist?), exception is thrown. So catch. try {
return await storage.read(key: myKey);
} catch (e) {
return null;
} And targetSdkVersion 30 may cause this. (Or android version?) |
Still the same issue with Pixel4a Android 12 and flutter_secure_storage 5.0.2 "PlatformException(Exception encountered, read, javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT" Problem occurs with read AND readAll |
Same issue for me .. please reopen the ticket and fix it |
+1 |
flutter_secure_storage: 4.2.0
Android 11
M2102K1C 1050
Crashed in non-app: message_codecs.dart in StandardMethodCodec.decodeEnvelope within flutter
flutter_secure_storage.dart in FlutterSecureStorage.read at line 50 within flutter_secure_storage
Called from:
flutter_secure_storage.dart in FlutterSecureStorage.containsKey at line 71 within flutter_secure_storage
PlatformException
PlatformException(Exception encountered, read, javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method)
at com.android.org.conscrypt.OpenSSLEvpCipher.doFinalInternal(OpenSSLEvpCipher.java:152)
at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:374)
at javax.crypto.Cipher.doFinal(Cipher.java:2055)
at com.it_nomads.fluttersecurestorage.ciphers.StorageCipher18Implementation.decrypt(StorageCipher18Implementation.java:91)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.decodeRawValue(FlutterSecureStoragePlugin.java:162)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.read(FlutterSecureStoragePlugin.java:143)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.access$400(FlutterSecureStoragePlugin.java:30)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin$MethodRunner.run(FlutterSecureStoragePlugin.java:200)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:233)
at android.os.HandlerThread.run(HandlerThread.java:67)
The text was updated successfully, but these errors were encountered: