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

KeyStoreService.del null object reference on HUAWEI device 7.0 #25

Open
Gaetano-Dati opened this issue Jan 30, 2018 · 15 comments
Open

KeyStoreService.del null object reference on HUAWEI device 7.0 #25

Gaetano-Dati opened this issue Jan 30, 2018 · 15 comments
Assignees

Comments

@Gaetano-Dati
Copy link

java.lang.RuntimeException: Unable to create application com.bananasrl.banana.Utils.App: java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.del(java.lang.String, int)' on a null object reference
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5678)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6524)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.del(java.lang.String, int)' on a null object reference
at android.security.KeyStore.delete(KeyStore.java:186)
at android.security.Credentials.deletePrivateKeyTypeForAlias(Credentials.java:292)
at android.security.Credentials.deleteAllTypesForAlias(Credentials.java:251)
at android.security.keystore.AndroidKeyStoreKeyGeneratorSpi.engineGenerateKey(AndroidKeyStoreKeyGeneratorSpi.java:329)
at javax.crypto.KeyGenerator.generateKey(KeyGenerator.java:580)
at devliving.online.securedpreferencestore.EncryptionManager.generateAESKey(EncryptionManager.java:502)
at devliving.online.securedpreferencestore.EncryptionManager.generateKey(EncryptionManager.java:472)
at devliving.online.securedpreferencestore.EncryptionManager.setup(EncryptionManager.java:145)
at devliving.online.securedpreferencestore.EncryptionManager.(EncryptionManager.java:124)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.(SecuredPreferenceStore.java:42)
at devliving.online.securedpreferencestore.SecuredPreferenceStore.init(SecuredPreferenceStore.java:87)
at com.bananasrl.banana.Utils.App.onCreate(App.java:111)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1028)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5659)
... 8 more

@Gaetano-Dati
Copy link
Author

@iamMehedi please can you tell me something about It? Thanks

@iamMehedi
Copy link
Owner

iamMehedi commented Jan 31, 2018 via email

@Gaetano-Dati
Copy link
Author

Ok, the client is waiting for my Application which also contains your library.
Thank you very much.

@iamMehedi
Copy link
Owner

@Gaetano-Dati the error is happening in internal code of the KeyGenerator

@Gaetano-Dati
Copy link
Author

And how can I delete this error? Modify something into the KeyGenerator class?
Can you do it and publish new version?
I'm about to publish the application.
Thanks

@iamMehedi
Copy link
Owner

It's an internal issue of android/huawei's Keystore implementation, so there's nothing to fix in the library in particular.

@Gaetano-Dati
Copy link
Author

Uhmm so the crash remains? And we can't deal with it? Ok. Thanks

@Gaetano-Dati
Copy link
Author

I'm afraid that this problem will happen on every Huawei device.

@iamMehedi
Copy link
Owner

As the issue seems to be with the OS on Huawei devices, this will happen on all their devices at least the ones that are running the same version of the OS.

@javichaques
Copy link

Hello,

I have the same issue in my Huawei P8 Lite.

@Gaetano-Dati @iamMehedi
Were you able to solve this? Workaround?

@Gaetano-Dati
Copy link
Author

Gaetano-Dati commented May 31, 2018 via email

@javichaques
Copy link

:(
How are you save the preference ins this moment? @Gaetano-Dati

Thank you

@maxkomarychev
Copy link

@Gaetano-Dati hey, did you get this error on actual device you have or it's from google pre-launch report or any other crash-reporting service (like crashlytics..)?

if first is true - did you by any chance tried this on any other android version on Huawei device?

@kutran
Copy link

kutran commented Jun 12, 2018

I just saw this on our pre-launch report trying to start an internal test track. I am wondering running this will cause the same problem on Huawei (or any other phones like ZTE).

I think FireBase has Android Testing on the cloud; I am going to try it out.

@xrom888
Copy link

xrom888 commented Jul 5, 2018

I tried last version 0.7.0 on my Huawei P7 works well now.

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

6 participants