Flutter Secure Storage is Not working on Release Mode in Android 14
Closed this issue · 7 comments
ActivityRecord{a1891bf u0 com.nic.InspectionAppNew/.MainActivity t2886}#209122 id info cannot be read from 'ActivityRecord{a1891bf u0 com.nic.InspectionAppNew/.MainActivity t2886}#209122'
2024-03-12 15:56:49.704 858-1179 BufferQueueDebug surfaceflinger E 9f428b6 Splash Screen com.nic.InspectionAppNew#209123 id info cannot be read from '9f428b6 Splash Screen com.nic.InspectionAppNew#209123'
2024-03-12 15:56:49.712 858-1179 BufferQueueDebug surfaceflinger E Splash Screen com.nic.InspectionAppNew$_1786#209124 id info cannot be read from 'Splash Screen com.nic.InspectionAppNew$_1786#209124'
2024-03-12 15:56:49.751 858-2038 BufferQueueDebug surfaceflinger E 86d4f19 ActivityRecordInputSink com.nic.InspectionAppNew/.MainActivity#209129 id info cannot be read from '86d4f19 ActivityRecordInputSink com.nic.InspectionAppNew/.MainActivity#209129'
2024-03-12 15:56:49.887 858-2038 BufferQueueDebug surfaceflinger E c21616d com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity#209130 id info cannot be read from 'c21616d com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity#209130'
2024-03-12 15:56:49.907 858-2038 BufferQueueDebug surfaceflinger E com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity$_6062#209131 id info cannot be read from 'com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity$_6062#209131'
2024-03-12 15:56:49.932 858-1179 BufferQueueDebug surfaceflinger E Bounds for - com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity@0#209134 id info cannot be read from 'Bounds for - com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity@0#209134'
2024-03-12 15:56:49.933 858-2858 BufferQueueDebug surfaceflinger E SurfaceView[com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity]@0#209135 id info cannot be read from 'SurfaceView[com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity]@0#209135'
2024-03-12 15:56:49.933 858-1179 BufferQueueDebug surfaceflinger E SurfaceView[com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity]@0(BLAST)#209136 id info cannot be read from 'SurfaceView[com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity]@0(BLAST)#209136'
2024-03-12 15:56:49.934 858-1179 BufferQueueDebug surfaceflinger E Background for SurfaceView[com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity]@0#209137 id info cannot be read from 'Background for SurfaceView[com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity]@0#209137'
2024-03-12 15:56:50.030 858-2858 BufferQueueDebug surfaceflinger E Surface(name=c21616d com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity)/@0xf625125 - animation-leash of starting_reveal#209138 id info cannot be read from 'Surface(name=c21616d com.nic.InspectionAppNew/com.nic.InspectionAppNew.MainActivity)/@0xf625125 - animation-leash of starting_reveal#209138'
2024-03-12 15:56:55.150 6062-6192 ProfileInstaller com.nic.InspectionAppNew D Installing profile for
while I try to Read the Values I am end up with this Big thing and my Apllication crashed with this error
any update on this? i get no exception or anything, if i try to read the values i have stored in secure storage after restarting the app, nothing shows up.
have you solved this?
I'm experiencing the same on Oneplus 12, Android 14 and some other phone models. If I read after write, the values show up, but fail to appear after restart of the app. Logcat does not have anything related.
This happens somewhat repeatably also in the debug build and in debugger.
I added a generous amount of Log.d's to the flutter_secure_storage's "FlutterSecureStorage.java" and got the following printouts. The code calls for read("welcome") and then readAll() to enumerate storage content. The raw.entrySet() in readAll() seems to contain a lot of entries, but keyWithPrefix is somehow mangled: it has wrong prefix and no "=" followed by the value.
A functional entry looks like this: raw.entrySet(): entry: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg_birthYear=ZP6OL5ZSrFipHMtzEoW0VuIS5DTl7rPK9x6B45d3jEM=
.
D/SecureStorageAndroid(21551): ensureOptions() D/SecureStorageAndroid(21551): ensureInitialized() D/SecureStorageAndroid(21551): ensureOptions() D/SecureStorageAndroid(21551): preferences = nonEncryptedPreferences I/flutter (21551): FlutterSecureStorage [APP_SETTING_WELCOME]: null D/SecureStorageAndroid(21551): ensureOptions() D/SecureStorageAndroid(21551): ensureInitialized() D/SecureStorageAndroid(21551): ensureOptions() D/SecureStorageAndroid(21551): preferences = nonEncryptedPreferences D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBTFgRAkYi0RFQ6E+vv8X6W2W9RUXVejgwMb1fKOQbZPvn8s67Loe3eDLTyrekJisvTEO2+JIIh0zScv+H+ebDms80rLFpVVOfTM/LkRFZ2F/XRB+U5M++mHah65iQ===AX0lTB4djYdABRuXC56RC0ChQ0Z4VtVUaD8/T8prqNwr9+GOfgFXPfeb3DwZWA== D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBTFgRAkYi0RFQ6E+vv8X6W2W9RUXVejgwMb1fKOQbZPvn8s67Loe3eDLTyrekJisvTEO2+JIIh0zScv+H+ebDms80rLFpVVOfTM/LkRFZ2F/XRB+U5M++mHah65iQ==, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBQErghTngjZAFOH1eVE3C3AwLrAz1OuQqcGoPrSBXQeD5N3AF68SQHOHjNvLPCkaOtpdHmnrQClxBEHEc/ydOjRIKYtZTRtZj8HX8oG=AX0lTB5bpUDPmENjYkoZTHpHhOkzUsBPKBw313hv8OCBSDNCSLmQAnpweEC7aKFS5w3mv1DS0JZ4mC8= D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBQErghTngjZAFOH1eVE3C3AwLrAz1OuQqcGoPrSBXQeD5N3AF68SQHOHjNvLPCkaOtpdHmnrQClxBEHEc/ydOjRIKYtZTRtZj8HX8oG, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: __androidx_security_crypto_encrypted_prefs_key_keyset__=12a90176ef440c166f7660a32e8817a4cc0a85181a79c9f4f3fa4065449a1cb79c9df8ac29c9b48b03dba53d99e77c3588ac7de601865cfc3b271c0815df738312e648ccf10cae4afce1a5dfd843f1f7f48ad82a651465233db2afce897121057ad8258de3a70c8b2c4675f660cf6043fe3af8345e34773b60c971b1d7148c41f619c31fed1c8e8e0cd38d539e1cc232869d6f0d80f6427f3247d9f5243ac5dd34e49ef6e67ec69615fd8d191a440894b8e2c605123c0a30747970652e676f6f676c65617069732e636f6d2f676f6f676c652e63727970746f2e74696e6b2e4165735369764b657910011894b8e2c6052001 D/SecureStorageAndroid(21551): keyWithPrefix: __androidx_security_crypto_encrypted_prefs_key_keyset__, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBQgQrkaZr0wJBakKqR4oJvYC8PbHDDauQjcv4C18SpnI4IG0YdnGycoihaKrD4R8kFsT2JD5B+a4Aw9YqEekXNuh6Ir9u5/bk+cQjvnP+NDukdVBg===AX0lTB6b28xouce+4iMs4PLiGKQgmDdhiyv7zbWv/el67EbWZlYKsQWkZI1p8w== D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBQgQrkaZr0wJBakKqR4oJvYC8PbHDDauQjcv4C18SpnI4IG0YdnGycoihaKrD4R8kFsT2JD5B+a4Aw9YqEekXNuh6Ir9u5/bk+cQjvnP+NDukdVBg==, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBSNMssdWM2CJhby2radSjXsn0OB18h/oWevHFhxup1ol0J2NmBQQjH1TvSfDqOIlqM0Rmxj4ojKnCZQspDyJv3POajSFEjQiFWOtQ===AX0lTB7nqy4oEFFWll/i3dsim19k+nO+4I+XB0W0g/bCku1UWfUjFT9smy+w D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBSNMssdWM2CJhby2radSjXsn0OB18h/oWevHFhxup1ol0J2NmBQQjH1TvSfDqOIlqM0Rmxj4ojKnCZQspDyJv3POajSFEjQiFWOtQ==, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBRHduhYHFKZTsmi8Gr2Py8Z/mQnGWK3W20RgVX7xxO2crvn9XYPZNmkCd1Dyr6SQWoUVvArKeAKnAipGyQjyVtfwFevKKDH4hcHmYeF=AX0lTB47cW3VHGY6O2BZAzQVsIJkGqbQxULCxpe0KsF1ZQ1rXontOb43CnmXRI3HurXKKIiisEG0V5VoN6l5MZDN4IuilkrfjaxCx/VHzYI4oy79vuEIBcqa8BsoNqmRF3aGJvDyf76ciDpdDdcxvKY5BNWkYle3FmSnTEUQ9mnHV1NyVGJ06WjixobIW1JFvPcVIkIKn+gL55W1/56yzWqBarxVsVR8PatL0N8qEpKGBQjiTM3wtNgoaWSxJtogwv/89Mc74SEfozl5q/pIQDdWDhbYe8BWlmn8CLKoImqG6rCXoUWJBcSByTUs5X6bFb8ALODSqs7RyMew58SIhKRGceJN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Xt9eFdujRysFE5U9gZpybPaqc13/OPaecTXwRs/2qrVu2ImnRTXEweF1V5bGVQoqd7EoiQFMQKtwWGCvPaSqLWNrLtOEtzUSI97lTF5Zu8hOecQQDBvkIcKmyV9fzcmc315t2EKro8rJDTjz3YaCUEg93SBioBVy2Q1CjDxmy7/Pa6qdOlEN/MWoa9TsP1Qzvq2ZR/k6kCRU0g9Qxcv+2aro6Dpei5TK9nmT4Jot2l/Sa/HzJlLnLPPNZmpJpgpnRVsBH4ytPjD3iqMWHm2hgZlL0PbxkVFxbCIJYABGNo7l65kgx3w2HBB9zNkrGb+76 D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBRHduhYHFKZTsmi8Gr2Py8Z/mQnGWK3W20RgVX7xxO2crvn9XYPZNmkCd1Dyr6SQWoUVvArKeAKnAipGyQjyVtfwFevKKDH4hcHmYeF, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBTkFER/YUQCPjKlQOoK9l3QrtsvwqSDH8gvqXDGCsT7amREQAOwvN7XlVRLRQMSWTIzVJ0GIoedFOJiASBbgYGWxJjHQq1a/VoKKRdgkSHp0teSCpgEWPk==AX0lTB75hNjE4+XihEIsqsBs9f97D80jpUOpS1iaYc/y9hxA5CpIFmCh++1AEg== D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBTkFER/YUQCPjKlQOoK9l3QrtsvwqSDH8gvqXDGCsT7amREQAOwvN7XlVRLRQMSWTIzVJ0GIoedFOJiASBbgYGWxJjHQq1a/VoKKRdgkSHp0teSCpgEWPk=, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: __androidx_security_crypto_encrypted_prefs_value_keyset__=1288014f695320bf86a954fafd5a399b1de83b0ec7fa86dd7236ab68a936328088b09655cc338e9f3436ce72dad0321c7683c01aafdc6643ec350fba5a1f14e43fcb7276a127d3d2d1d7587fd853c143cb56d40579ac34aa1e4a93d95f193922c57f111c43c1d3ab204c1665008491d99c505ca57440c1ddd5b2a3f4913262c703415d43950a2ef26ab5ed1a44089e9895e907123c0a30747970652e676f6f676c65617069732e636f6d2f676f6f676c652e63727970746f2e74696e6b2e41657347636d4b65791001189e9895e9072001 D/SecureStorageAndroid(21551): keyWithPrefix: __androidx_security_crypto_encrypted_prefs_value_keyset__, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBTwsgPpIwl4vsEbwrEvOBtIqBpWGYpM2FpeB2gz5u5mJoOp9vaHibNZ7rrGkBTCGONKZwWj73ce0xvYuQKq41emH8Ea5YTX5zt8DVPZ/p1+GQ===AX0lTB6hUQZIncKExQWRg5hXL9Z6wBXtmlUVaaaBTb5iOgacHKQ+skPt D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBTwsgPpIwl4vsEbwrEvOBtIqBpWGYpM2FpeB2gz5u5mJoOp9vaHibNZ7rrGkBTCGONKZwWj73ce0xvYuQKq41emH8Ea5YTX5zt8DVPZ/p1+GQ==, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(21551): raw.entrySet(): entry: AVjYnBQrBYndNI36Q3jrIELlXAmix2udkW3exVUEhx5Qwbdg4tG2nTApBx2nQ5FFx/jNRPC3e3tTYPYm1LG3ndR7hTpd3oX8BnaAGWc9yuaik8c==AX0lTB4ELYDN+nr9XYMd38apLAXhpHwv6qC2VaVRO9a68fSmCs2W+4FeQMnfHg== D/SecureStorageAndroid(21551): keyWithPrefix: AVjYnBQrBYndNI36Q3jrIELlXAmix2udkW3exVUEhx5Qwbdg4tG2nTApBx2nQ5FFx/jNRPC3e3tTYPYm1LG3ndR7hTpd3oX8BnaAGWc9yuaik8c=, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(21551): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX)
After adding editor.commit();
in the end of write() method, the read() returns correct data, but enumeration still contains also the invalid "AVjY..." entries:
D/SecureStorageAndroid(29903): keyWithPrefix: AVjYnBQgQrkaZr0wJBakKqR4oJvYC8PbHDDauQjcv4C18SpnI4IG0YdnGycoihaKrD4R8kFsT2JD5B+a4Aw9YqEekXNuh6Ir9u5/bk+cQjvnP+NDukdVBg==, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(29903): ELSE !keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(29903): raw.entrySet(): entry: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg_welcome=twv+zrn1pRPG2zqTQ3zESNfPf3dr2tVST+3AcUfYnGM= D/SecureStorageAndroid(29903): D/SecureStorageAndroid(29903): keyWithPrefix: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg_welcome, ELEMENT_PREFERENCES_KEY_PREFIX: VGhpcyBpcyB0aGUgcHJlZml4IGZvciBhIHNlY3VyZSBzdG9yYWdlCg D/SecureStorageAndroid(29903): keyWithPrefix.contains(ELEMENT_PREFERENCES_KEY_PREFIX) D/SecureStorageAndroid(29903): decodeRawValue(): twv+zrn1pRPG2zqTQ3zESNfPf3dr2tVST+3AcUfYnGM= D/SecureStorageAndroid(29903): D/SecureStorageAndroid(29903): - result: false
I managed to fix the issue in our app by:
- setting "encryptedSharedPreferences=true" for Android options
- making sure that I use shared instance of FlutterSecureSettings (probably was not needed)
Note: I have this nagging feeling that the "AVjYnBSNMssdWM2CJhby..." -entries are actually encrypted "key=value" strings, but I couldn't figure out what would have caused them...
Finally, I fixed it. is there any one still facing this issue ?? ping me
Facing same issue on Android @Pursoth1815
@Pursoth1815 how did you fix it?