-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Play Store reporting Medic app crashes #338
Comments
Updates:
|
I've had a look through the stacktrace. All search results are coming back saying every fragment needs a public empty constructor. This is confirmed by the docs: https://developer.android.com/reference/android/app/Fragment.html#Fragment()
Following this thread and I noticed that the EmbeddedBrowserActivity.onCreate method that's throwing the Exception does set up the OpenSettingsDialogFragment here. If you go to the OpenSettingsDialogFragment source you will in fact see we specify a constructor with args and do not have a default public no arg constructor. So I think this is the smoking gun - we're doing exactly what the docs say we must not do. Funnily enough we're even suppressing the lint error that would have picked this up. There's even a hint about how to reproduce this in this line of the docs...
What I think might be happening is the app is returning from some sort of hibernation state and Android is reconstructing this Fragment and finding no constructor for it to call. This is still quite hard to reproduce because I don't know how to force an app into hibernation, but it's a start. Maybe there's a way in the emulator to force it? Anyway, my approach to fix this would be...
@sugat009 Does that all make sense? Can you start on this list without necessarily reproducing the issue yourself? |
@garethbowen Thanks for such a detailed investigation and explanation. I'll pick this up after my work in the app services team is done. |
Describe the bug
Play Store is reporting the "Medic" android app is crashing for 15% of users many with a
android.app.Fragment$InstantiationException
. The Medic app isn't "production" but we should investigate to ensure this doesn't impact anyone else, and prioritise accordingly.To Reproduce
Not sure how to reproduce it.
Expected behavior
No crashes.
Logs
Environment
Additional context
More info here: https://play.google.com/console/developers/7987044497930745454/app/4973604959552855131/vitals/crashes?errorType=CRASH&appProcessState=Foreground&days=28
The text was updated successfully, but these errors were encountered: