Skip to content
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

IllegalBlocksizeException Huawei p8 lite ALE-L21 #20

Open
fermedina opened this issue Oct 24, 2017 · 9 comments
Open

IllegalBlocksizeException Huawei p8 lite ALE-L21 #20

fermedina opened this issue Oct 24, 2017 · 9 comments
Assignees

Comments

@fermedina
Copy link

Hi. I have an issue similar to 18. When I try store an string in Huawei p8 lite ALE-L21 I get this error:

10-24 14:49:24.216 10624-10721/com.twogetherbank.app W/System.err: javax.crypto.IllegalBlockSizeException
10-24 14:49:24.221 10624-10721/com.twogetherbank.app W/System.err:     at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:486)
10-24 14:49:24.221 10624-10721/com.twogetherbank.app W/System.err:     at javax.crypto.Cipher.doFinal(Cipher.java:1505)
10-24 14:49:24.221 10624-10721/com.twogetherbank.app W/System.err:     at devliving.online.securedpreferencestore.EncryptionManager.encryptAES(EncryptionManager.java:401)
10-24 14:49:24.221 10624-10721/com.twogetherbank.app W/System.err:     at devliving.online.securedpreferencestore.EncryptionManager.encrypt(EncryptionManager.java:242)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at devliving.online.securedpreferencestore.EncryptionManager.tryEncrypt(EncryptionManager.java:175)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at devliving.online.securedpreferencestore.EncryptionManager.encrypt(EncryptionManager.java:287)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at devliving.online.securedpreferencestore.SecuredPreferenceStore$Editor.putString(SecuredPreferenceStore.java:232)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at com.twogetherbank.app.utils.managers.CategoryManager$loadCategoriesFromServer$1.invoke(CategoryManager.kt:64)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at com.twogetherbank.app.utils.managers.CategoryManager$loadCategoriesFromServer$1.invoke(CategoryManager.kt:18)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Async.kt:140)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Async.kt)
10-24 14:49:24.222 10624-10721/com.twogetherbank.app W/System.err:     at org.jetbrains.anko.AsyncKt$sam$Callable$761a5578.call(Async.kt)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err:     at java.lang.Thread.run(Thread.java:833)
10-24 14:49:24.224 10624-10721/com.twogetherbank.app W/System.err: Caused by: android.security.KeyStoreException: -65536
10-24 14:49:24.225 10624-10721/com.twogetherbank.app W/System.err:     at android.security.KeyStore.getKeyStoreException(KeyStore.java:632)
10-24 14:49:24.225 10624-10721/com.twogetherbank.app W/System.err:     at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.update(KeyStoreCryptoOperationChunkedStreamer.java:132)
10-24 14:49:24.225 10624-10721/com.twogetherbank.app W/System.err:     at android.security.keystore.KeyStoreCryptoOperationChunkedStreamer.doFinal(KeyStoreCryptoOperationChunkedStreamer.java:217)
10-24 14:49:24.225 10624-10721/com.twogetherbank.app W/System.err:     at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineDoFinal(AndroidKeyStoreCipherSpiBase.java:473)
10-24 14:49:24.225 10624-10721/com.twogetherbank.app W/System.err: 	... 17 more

In others devices the library works fine.

Can you help me?

@fermedina
Copy link
Author

Hi! I have the same problems in all Huawei devices. What is the problem?

@iamMehedi
Copy link
Owner

So the library is not working at all on those devices? Or does this happen after you've changed PIN/Password/Fingerprint of the device? And please share the OS version and the type of screen security you had in place.

@iamMehedi iamMehedi self-assigned this Nov 30, 2017
@Gaetano-Dati
Copy link

Gaetano-Dati commented Jan 15, 2018

Hi, same problem here.. Android O is the OS and the device is a Nexus6 Emulator. Trying to put a jsonString from GSon library. GSon.toJson(string)

@iamMehedi
Copy link
Owner

@Gaetano-Dati thanks for the info. I'll see if I can reproduce it and find out the reason behind it.

@Gaetano-Dati
Copy link

So did you come out and find the solution?
Thanks

@iamMehedi
Copy link
Owner

@Gaetano-Dati Tried the sample app on A Nexus 6 emulator with Android O (with google APIs) but couldn't reproduce the issue.

@Gaetano-Dati
Copy link

The issue was reproduced on a physical device during a robo test by firebase. The error is at the moment the Application class gets called. I didn't experience this error on one of my devices but I don't have a Huawei. I emulated the Application on a Nexus 6 with Android O and It didn't give me the error. Have you got a Huawei physical devices in order to test it?

@Gaetano-Dati
Copy link

I'm talking about this issue:
KeyStoreService.del null object reference on HUAWEI device 7.0 #25

I pasted this because we are in another thread. I found a solution to my first issue which is at the starting point of this list.

@iamMehedi
Copy link
Owner

@Gaetano-Dati No, unfortunately don't have a Huawei device for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants