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

NPE on Xiaomi MI 5s #85

Open
PblryH opened this issue Feb 28, 2018 · 3 comments
Open

NPE on Xiaomi MI 5s #85

PblryH opened this issue Feb 28, 2018 · 3 comments
Labels

Comments

@PblryH
Copy link

PblryH commented Feb 28, 2018

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.String java.lang.CharSequence.toString()' on a null object reference at com.mtramin.rxfingerprint.FingerprintObservable$2.onAuthenticationError(FingerprintObservable.java:89) at android.hardware.fingerprint.FingerprintManager$MyHandler.sendErrorResult(FingerprintManager.java:848) at android.hardware.fingerprint.FingerprintManager$MyHandler.handleMessage(FingerprintManager.java:813) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6321) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)

@PblryH
Copy link
Author

PblryH commented Feb 28, 2018

My solution
emitter.onError(new FingerprintAuthenticationException(errString != null ? errString : "Error code: " + errMsgId));

And solution for potential NPE on line FingerprintObservable.java:100
FingerprintObservable.this.onAuthenticationHelp(emitter, helpMsgId, helpString != null ? helpString.toString() : "Help code: " + helpMsgId);

@Mauin Mauin added the crash label Mar 7, 2018
@Mauin
Copy link
Owner

Mauin commented Mar 7, 2018

Interesting. This looks like Xiaomi devices might not supply a string in those callbacks at all under some conditions. Do you want to create a PR with your proposed fix for this?

@PblryH
Copy link
Author

PblryH commented Mar 10, 2018

Do you want to create a PR with your proposed fix for this?

it would be nice.

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

No branches or pull requests

2 participants