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.

Ahmad Mousa
  • 745
  • 2
  • 7
  • 18
  • Possibly related: https://stackoverflow.com/questions/28134128/android-permission-interact-across-users-full – Morrison Chang Jun 22 '18 at 18:16
  • @MorrisonChang Thanks, I already checked that article, so I mentioned that I already added the with same crashes :/ – Ahmad Mousa Jun 22 '18 at 18:36
  • Seems my issue related to https://stackoverflow.com/questions/37780080/android-fingerprints-hasenrolledfingerprints-triggers-exception-on-some-samsung i will check and see if this will fix the issue – Ahmad Mousa Jun 22 '18 at 19:28

1 Answers1

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

Ahmad Mousa
  • 745
  • 2
  • 7
  • 18