nylo-core / nylo

Nylo is the fastest way to build your next Flutter mobile app. Streamline your projects with Nylo's opinionated approach to building Flutter apps. Develop your next idea ⚡️

Home Page:https://nylo.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new hidden bug

andim27 opened this issue · comments

I found bug in NyStorage:
Sometime on old phones have an error

 NyStorage.read at line 200 within nylo_support
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.OpenSSLCipher$EVP_CIPHER.doFinalInternal(OpenSSLCipher.java:596)
	at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:363)

I think better choice use try-catch in the core: in String? data = await StorageManager.storage.read(key: key);
Will wait new update

Hi @andim27,

Hope you are well, thanks for reporting this.

I've done a bit of digging online and it appears related to the below issues:
mogol/flutter_secure_storage#210
BitCodersNN/unn-mobile#224

This appears to be the solution: mogol/flutter_secure_storage#43 (comment)

<application
    ...
        android:allowBackup="false"
        android:fullBackupContent="false">

I've updated Nylo in this commit to fix it 2be2d5b 👍