cordova-plugin-android-fingerprint-auth: android.content.res.Resources$NotFoundException

I can’t reproduce this consistently. It’s usually when the app is launching after it’s been backgrounded for a while.

I’m essentially using version 1.2.2 of the plugin. So far only seen on Android 7.1, Nexus 5X (bullhead).

java.lang.RuntimeException: Unable to start activity ComponentInfo{ca.koho/ca.koho.Koho}: android.content.res.Resources$NotFoundException: Resource ID #0x0
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
	at android.app.ActivityThread.-wrap12(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6119)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
	at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:190)
	at android.content.res.Resources.loadXmlResourceParser(Resources.java:2101)
	at android.content.res.Resources.getLayout(Resources.java:1115)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:424)
	at com.cordova.plugin.android.fingerprintauth.FingerprintAuthenticationDialogFragment.onCreateView(FingerprintAuthenticationDialogFragment.java:85)
	at android.app.Fragment.performCreateView(Fragment.java:2353)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:995)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153)
	at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2039)
	at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:176)
	at android.app.Activity.performCreateCommon(Activity.java:6673)
	at android.app.Activity.performCreate(Activity.java:6681)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
	... 9 more

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 29 (11 by maintainers)

Most upvoted comments

I am thinking because this issue is so elusive and difficult to reproduce and is only happening on a subset of devices, it could be related to the implementation. My best guess is this is happening because of a state loss when your application goes to the background when the dialog is being displayed. I can publish a version of the plugin that includes a dismiss action that will remove the dialog if it is currently displayed. Utilizing this method, you could tap in to the onpause event and dismiss the dialog before your application goes to the background. Then you could check your analytics to see of the errors stop happening all together as we are unable to replicate the issue and check to see if this solution would help at all.

Please let me know if you are interested in trying this solution.

Got this exception again while using 1.3.0 on a Nexus 6P (Android 7.1.2). Stack trace is the same and occurred twice for this user. Don’t have a reproducible example yet however.

Yes, the dismiss() method has been published. No one experiencing this issue has commented whether or not they have implemented it or if it has had any impact.

+1 to what @SeeWhat said, although we’re still on 1.2.8. We’ve seen about ~150 crashes on 7.0 Samsung Galaxy devices:

screen shot 2017-08-03 at 10 37 07 am