-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
Huawei Android 7.0 java.lang.NullPointerException #115
Comments
@phillbaker did you have a chance to check this on other android versions? is it only specific to 7.0 on Huawei? |
It is specific to 7.0 on Huawei and noticeable mostly through the Google Play store's automated testing. |
I see the same crash in Google Play pre-launch report. However, I got this device from eBay and was able to run the app without issues. So I also contacted Google for more explanations and got an answer they are pretty confident in their tests. So I'm a bit confused now. |
@emartynov hey, is the device that you've got is the same model and android version? |
what is the purpose of what is happening to this secret key? is it getting written somewhere implicitly? cc @oblador |
Yes, Mate 9 and Android 7 |
@maxkomarychev upon quick look at the code you linked, that indeed seems suspicious; I'd guess the retuned key should be assigned to the |
After looking around in the code I found out exceptions are handled in two different ways:
It looks like generic Line 91 in c3990b0
Thoughts? |
@maxkomarychev it seems like you spent some time with the code and got some insights; I suggest you open a PR and we can iterate on the proposed improvements there. |
@vonovak sure, I'll try to prepare something tomorrow. |
`NullPointerException` thrown on some Huawei devices is crashing entire app. Handle all exceptions and rethrow them as caught exceptions. This is an attempt to prevent issue described in oblador#115.
@emartynov @phillbaker will appreciate if you guys can try this on your side if this issue is still relevant to you. Thanks. You can try this fix with this line in your
|
Unfortunately, I got this crash with own crypto functionality, so I can not confirm. As well, the app will not crash but at the same time, you lost secure storage. Are you sure want to operate with this conditions? Sure, you can report to the user that app will not work on this device, but I really not sure if it is the best option. |
I would love if the app won't crash in first place, the rest depends on the specific functionality the specific app provides. While my PR doesn't solve the core problem it is at least making it possible to handle the error on js side. |
`NullPointerException` thrown on some Huawei devices is crashing entire app. Handle all exceptions and rethrow them as caught exceptions. This is an attempt to prevent issue described in oblador#115.
@maxkomarychev makes sense to me - if we do get an exception in JS we can display the problem to the user and handle appropriately. |
`NullPointerException` thrown on some Huawei devices is crashing entire app. Handle all exceptions and rethrow them as caught exceptions. This is an attempt to prevent issue described in #115.
This should be "solved" in 3.0.0. Closing this for now, reopen if issues persist. |
Thanks for the hard work on this package!
I'm not sure this is an issue with this library, but I wanted to document it in case others are also experiencing it (it looks similar to iamMehedi/Secured-Preference-Store#25).
When uploading our app to the Google Play store, google's pre-launch report indicates that the app is crashing with a null pointer exception (see stack trace at bottom). On launch our app (abbreviated) calls:
Should we not do this?
Using version 2.0.0-rc of this package.
Stacktrace:
The text was updated successfully, but these errors were encountered: