2

I applied fingerprint integration within my App to login with fingerprint.

After releasing the App to public, I saw hundreds of crash reports generated by Fabric's Crashlytics caused by this, as below:

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxx.xxxxx/com.xxx.xxxxx.LoginActivity}: java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=26824, uid=10144 requires android.permission.INTERACT_ACROSS_USERS
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3319)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
   at android.app.ActivityThread.access$1100(ActivityThread.java:229)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:148)
   at android.app.ActivityThread.main(ActivityThread.java:7406)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

The weird thing is, all crashes are on Samsung devices only!

Galaxy J7 57%

SM-J327P 9%

Galaxy A5 7%

SM-G532F 7%

Galaxy J5 1%

Galaxy S6 Edge 1%

The Manifest file already have the permission as below:

<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"/>

Is there any suggestions how to trace/fix this problem? I don't have any of the above devices on hand :/

Thanks.

3

1 Answer 1

5

It seems my issue is duplicate to this : Android Fingerprints: hasEnrolledFingerprints triggers exception on some Samsungs

Credit to: @david-medenjak

===============

I came across the same problem on a Samsung Galaxy S6, running Android 6.0.1

The Problem was caused by calling

fingerprintManager.hasEnrolledFingerprints()

I fixed it by adding a call to check for hardware before:

fingerprintManager.isHardwareDetected()
    && mFingerprintManager.hasEnrolledFingerprints()

Checking for fingerprints without the hardware available seems to cause this exception on some devices.

===============

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.