Closed jskrepnek closed 5 years ago
Hopefully this has been resolved with the fix to allow state loss in version 1.2.8 Closing this issue for now. If it is still occurring please reopen the issue.
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.
+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:
First of all, thank you for this plugin. It's very usefull. We have the same problem on Redmi 4, Redmi Note 3, Redmi 4X using plugin version 1.3.1. Please, could you reopen this issue and answer when the problem will be resolved? This is emergency situation. Thank you in advance.
Very difficult to troubleshoot with the stack trace alone. It has been mentioned that it cannot be reproduced consistent. I can not reproduce the error so I can't debug the issue. I do not have access to the devices mentioned for testing. If you would like resolution to this issue please contribute by providing more helpful/useful information.
@mjwheatley, I'm sorry for long answer. I had problems that demanded my immediate attention.
I can't reproduce it neither. I saw this from crash reporter in firebase console. I have only the stack trace. But it is the same as @jskrepnek wrote.
Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{air.com.ssdsoftwaresolutions.clickuz/air.com.ssdsoftwaresolutions.clickuz.MainActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2984)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3045)
android.app.ActivityThread.-wrap14 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1642)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6776)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)
Caused by android.content.res.Resources$NotFoundException: Resource ID #0x0
android.content.res.ResourcesImpl.getValue (ResourcesImpl.java:202)
android.content.res.Resources.loadXmlResourceParser (Resources.java:2970)
android.content.res.Resources.getLayout (Resources.java:1986)
android.view.LayoutInflater.inflate (LayoutInflater.java:425)
com.cordova.plugin.android.fingerprintauth.FingerprintAuthenticationDialogFragment.onCreateView (FingerprintAuthenticationDialogFragment.java:85)
android.app.Fragment.performCreateView (Fragment.java:2352)
android.app.FragmentManagerImpl.moveToState (FragmentManager.java:995)
android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1171)
android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1153)
android.app.FragmentManagerImpl.dispatchActivityCreated (FragmentManager.java:2043)
android.app.FragmentController.dispatchActivityCreated (FragmentController.java:177)
android.app.Activity.performCreateCommon (Activity.java:6949)
android.app.Activity.performCreate (Activity.java:6957)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1126)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2927)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3045)
android.app.ActivityThread.-wrap14 (ActivityThread.java)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1642)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:154)
android.app.ActivityThread.main (ActivityThread.java:6776)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)
Nothing new to add, but having the same issue with our apps. Not sure what Samsung does differently with their phones.
We traced most (but not all) of these to the scenario where the fragment was displayed when the application was paused. It our case it would usually happen when the power button was pressed. Have a look at the changes: https://github.com/kohofinancial/cordova-plugin-android-fingerprint-auth/commits/master.
Thanks for the response. I'm confused. We have version 1.31. of the plugin. The fix should be in that version? Not sure why we still get the crashes for samsung devices.
@newuser44 We forked the plugin - the fixes have not come back to the origin. You'd have to look at the commits in our forked repo for details.
Hi Current status for this error?
same here .. current status?
Current status: Same as my last post as no additional information has been provided to help troubleshoot the issue.
What do you need? we have crash logs
java.lang.RuntimeException: at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2924) at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2985) at android.app.ActivityThread.-wrap14 (ActivityThread.java) at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1635) at android.os.Handler.dispatchMessage (Handler.java:102) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6692) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1468) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1358) Caused by: android.content.res.Resources$NotFoundException: at android.content.res.ResourcesImpl.getValue (ResourcesImpl.java:202) at android.content.res.Resources.loadXmlResourceParser (Resources.java:2968) at android.content.res.Resources.getLayout (Resources.java:1984) at android.view.LayoutInflater.inflate (LayoutInflater.java:425) at com.cordova.plugin.android.fingerprintauth.FingerprintAuthenticationDialogFragment.onCreateView (FingerprintAuthenticationDialogFragment.java:85) at android.app.Fragment.performCreateView (Fragment.java:2352) 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:2043) at android.app.FragmentController.dispatchActivityCreated (FragmentController.java:177) at android.app.Activity.performCreateCommon (Activity.java:6906) at android.app.Activity.performCreate (Activity.java:6914) at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1126) at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2877)
Please provide steps to reproduce the issue on a simulator and the simulator config information.
It only happens on 7.0 devices as far as i can see. Perhaps somethings to do with theme? I cant reproduce it yet in emulators.
still more crashes every day.. (also on 8.0) ..
Since you can't reproduce it in emulators, is this specific to a subset of hardware devices? Have you been able to replicate the issue on one of the effect devices? If so, maybe we can work together to resolve the issue. Do you know if the error occurs because the dialog was open when your app when to the background?
Have you tried what @jskrepnek mentioned and dismiss the dialog in onPause?
@Override
public void onPause() {
super.onPause();
+ // Dismiss dialog to avoid doubling it on resume if app was closed by OS
+ dismissAllowingStateLoss();
mFingerprintUiHelper.stopListening();
}
If we can't replicate the issue it will be difficult to determine if any changes resolve the issue.
thanks! .. I'll try the onPause fix. !
same
Hey thanks for the support for this plugin.
Did this find a solution? This seems to be the biggest "crash" on my app.
java.lang.RuntimeException:
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2955)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3030)
at android.app.ActivityThread.-wrap11 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1696)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Caused by: android.content.res.Resources$NotFoundException:
at android.content.res.ResourcesImpl.getValue (ResourcesImpl.java:216)
at android.content.res.Resources.loadXmlResourceParser (Resources.java:2148)
at android.content.res.Resources.getLayout (Resources.java:1157)
at android.view.LayoutInflater.inflate (LayoutInflater.java:421)
at com.cordova.plugin.android.fingerprintauth.FingerprintAuthenticationDialogFragment.onCreateView (FingerprintAuthenticationDialogFragment.java:85)
at android.app.Fragment.performCreateView (Fragment.java:2611)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1276)
at android.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1549)
at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1611)
at android.app.FragmentManagerImpl.dispatchMoveToState (FragmentManager.java:3045)
at android.app.FragmentManagerImpl.dispatchActivityCreated (FragmentManager.java:2997)
at android.app.FragmentController.dispatchActivityCreated (FragmentController.java:179)
at android.app.Activity.performCreateCommon (Activity.java:7168)
at android.app.Activity.performCreate (Activity.java:7176)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908)
Was trying to locate ResourcesImpl.java:216 to get more info, not sure where the java file actually is located.
We are still getting this after adding @mjwheatley's workaround unfortunately.
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.
Any update on whether this worked? dismiss
is out there, right?
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.
Thanks for the references. I will go ahead and close this issue.
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).