Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
The most common devices for the first crash sorted from highest to lowest:
Samsung S8 (5% of all crashes), S9 (4%), S8+ (4%), S10+ (3%), S9+ (3%), Huawei P20 Pro & Lite (9%)
The most common devices for the second crash:
HUAWEI Y6 2019 (38% of all crashes), HUAWEI Y5 2019 (17%), Nokia 3 (10%), Nokia 2.1 (9 %), Oppo realme 1 (5%)
The most common devices for the third crash:
Samsung Galaxy A5 (14% of all crashes). S7 Edge (9%), Spa Condor Electronics PGN610 (17% of all crashes)
Samsung S8 (5% of all crashes), S9 (4%), S8+ (4%), S10+ (3%), S9+ (3%), Huawei P20 Pro & Lite (9%)
The most common devices for the second crash:
HUAWEI Y6 2019 (38% of all crashes), HUAWEI Y5 2019 (17%), Nokia 3 (10%), Nokia 2.1 (9 %), Oppo realme 1 (5%)
The most common devices for the third crash:
Samsung Galaxy A5 (14% of all crashes). S7 Edge (9%), Spa Condor Electronics PGN610 (17% of all crashes)
[Deleted User] <[Deleted User]> #3
Crash 3 is a dupe of issue 138825362
il...@google.com <il...@google.com> #4
Which library version are you using?
ap...@google.com <ap...@google.com> #5
yeap, at least #1 was reported against the alpha here: https://stackoverflow.com/q/56358422/270197 - while the lib is now in beta
il...@google.com <il...@google.com> #6
#1 and #3 are definitely fixable in the support library. #2 can likely be resolved by the app checking BiometricManager#canAuthenticate() before requesting BiometricPrompt#authenticate().
For #1)
Looks like somehow the app is trying to display the dialog after onSaveInstanceState(), e.g. the activity/fragment is ending its lifecycle? Curtis perhaps we should do some lifecycle checks here.
For #2)
tranced.freak@ do you happen to know which devices are reporting this?
There is a chance the following is happening:
- device does not have fingerprint hardware
- app requests authenticate()
- hasSystemFeature(FP) fails, but invokes sendError
- sendError needs FPM to get error string.
A solution on the app side is to check BiometricManager#canAuthenticate() before requesting authentication. Is this something the app is already doing? We will focus this bug on #1 and #3 until we hear otherwise.
For #3)
Similar onSaveInstanceState issue
For #1)
Looks like somehow the app is trying to display the dialog after onSaveInstanceState(), e.g. the activity/fragment is ending its lifecycle? Curtis perhaps we should do some lifecycle checks here.
For #2)
tranced.freak@ do you happen to know which devices are reporting this?
There is a chance the following is happening:
- device does not have fingerprint hardware
- app requests authenticate()
- hasSystemFeature(FP) fails, but invokes sendError
- sendError needs FPM to get error string.
A solution on the app side is to check BiometricManager#canAuthenticate() before requesting authentication. Is this something the app is already doing? We will focus this bug on #1 and #3 until we hear otherwise.
For #3)
Similar onSaveInstanceState issue
Description
Version used: 1.0.0-alpha11
Devices/Android versions reproduced on: irrelevant
I have a fragment like this:
<fragment
android:id="@+id/teamDetailFragment"
android:name="com.optima_apps.fkcz.ui.team.teamdetail.TeamDetailFragment"
android:label="{player_name}" <== PARAMETRIZED LABEL (from a plain string argument)
tools:layout="@layout/fragment_team_detail">
<argument
android:name="player"
app:argType="com.optima_apps.fkcz.models.Player" /> <== CUSTOM CLASS ARG TYPE
<argument
android:name="player_name"
app:argType="string" />
</fragment>
When parametrized label is used in combination with custom class argument type on a fragment, the app crashes when activity is recreated with a saved instance state. To reproduce, have a fragment configured as shown above, then in Developer Options enable "Don't keep activites" to force activity to destroy as soon as you leave it, then return to activity and it should crash like below:
2019-02-05 12:57:22.012 5790-5790/com.optima_apps.fkcz E/Parcel: Class not found when unmarshalling: com.optima_apps.fkcz.models.Player
java.lang.ClassNotFoundException: com.optima_apps.fkcz.models.Player
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.os.Parcel.readParcelableCreator(Parcel.java:2489)
at android.os.Parcel.readParcelable(Parcel.java:2443)
at android.os.Parcel.readValue(Parcel.java:2346)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2698)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.BaseBundle.containsKey(BaseBundle.java:345)
at androidx.navigation.ui.AbstractAppBarOnDestinationChangedListener.onDestinationChanged(AbstractAppBarOnDestinationChangedListener.java:90)
at androidx.navigation.ui.ToolbarOnDestinationChangedListener.onDestinationChanged(ToolbarOnDestinationChangedListener.java:57)
at androidx.navigation.NavController.addOnDestinationChangedListener(NavController.java:218)
at androidx.navigation.ui.NavigationUI.setupWithNavController(NavigationUI.java:292)
at androidx.navigation.ui.NavigationUI.setupWithNavController(NavigationUI.java:241)
at com.optima_apps.fkcz.FKCZActivity.onCreate(FKCZActivity.kt:41)
at android.app.Activity.performCreate(Activity.java:6915)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: com.optima_apps.fkcz.models.Player
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:1346)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:1406)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at android.os.Parcel.readParcelableCreator(Parcel.java:2489)
at android.os.Parcel.readParcelable(Parcel.java:2443)
at android.os.Parcel.readValue(Parcel.java:2346)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2698)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.BaseBundle.containsKey(BaseBundle.java:345)
at androidx.navigation.ui.AbstractAppBarOnDestinationChangedListener.onDestinationChanged(AbstractAppBarOnDestinationChangedListener.java:90)
at androidx.navigation.ui.ToolbarOnDestinationChangedListener.onDestinationChanged(ToolbarOnDestinationChangedListener.java:57)
at androidx.navigation.NavController.addOnDestinationChangedListener(NavController.java:218)
at androidx.navigation.ui.NavigationUI.setupWithNavController(NavigationUI.java:292)
at androidx.navigation.ui.NavigationUI.setupWithNavController(NavigationUI.java:241)
at com.optima_apps.fkcz.FKCZActivity.onCreate(FKCZActivity.kt:41)
at android.app.Activity.performCreate(Activity.java:6915)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
I have already Googled this a bit and this could be the solution:
When I change the label to be a static string, the library never goes into part of code that's crashing, and everything works properly, so I'm sure the issue is not on my side.
If you need any additional info I'm here.