sergeykomlach/AdvancedBiometricPromptCompat

org.json.JSONException: No value for manufacturer

Kelsios opened this issue · 2 comments

Hello there,
Thanks for the awesome library.
I'm facing a problem when running any version above and including 2.2.2 on Android 6 (API 23). Whenever I try to init the Biometric prompt for fingerprint, an exception is raised with CRYPTO_ERROR.
Taking a look at the logs, I think it fails at:

org.json.JSONException: No value for manufacturer
	at org.json.JSONObject.get(JSONObject.java:389)
	at org.json.JSONObject.getString(JSONObject.java:550)
	at com.jaredrummler.android.device.DeviceName$DeviceInfo.<init>(DeviceName.java:374)
        at com.jaredrummler.android.device.DeviceName$DeviceInfo.<init>(DeviceName.java:347)
        at com.jaredrummler.android.device.DeviceName.getDeviceInfo(DeviceName.java:186)
        at com.jaredrummler.android.device.DeviceName.getDeviceInfo(DeviceName.java:152)
        at dev.skomlach.common.device.DeviceModel.getNameFromDatabase(DeviceModel.kt:221)
 	at dev.skomlach.common.device.DeviceModel.getNames(DeviceModel.kt:73)
        at dev.skomlach.common.device.DeviceInfoManager.getDeviceInfo(DeviceInfoManager.kt:169)
  	at dev.skomlach.biometric.compat.BiometricPromptCompat$Companion.init$lambda$2(BiometricPromptCompat.kt:183)
  	at dev.skomlach.biometric.compat.BiometricPromptCompat$Companion.$r8$lambda$J5vqIrijExzJMjLVCNvGXPs11Ro(BiometricPromptCompat.kt)
  	at dev.skomlach.biometric.compat.BiometricPromptCompat$Companion$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
  	at dev.skomlach.common.misc.ExecutorHelper$startOnBackground$job$2.invokeSuspend(ExecutorHelper.kt:76)
 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
	at java.lang.Thread.run(Thread.java:818)

Could you please take a look at the issue and let me know?
Thanks a lot!

This non-fatal exception just needs to be handled silently, it doesn't have major side-effects on the lib (Btw what device you have?)
But CryptoError is another story, I'll check the reason

You are right about that warning, didn't realize it was not an error.
I was testing on a plain emulator from android studio, running API 23.
However, it seems that you can close this issue, since a clean build and a simple android restart did the trick, and it is now initializing as it should.
Though, I have no idea as to why this happened continuously. Maybe something bugged on the device's end.
Again, thanks a lot for your work!