0

The last time I update my app was 45 days ago, the app was working fine without any crashes but suddenly from last 10 days, I started seeing crashes happening in the app (My app doesn't make use of any kind of server except Firebase for analytics and crashes). The app is only crashing in Android 5.0 and Android 5.1, I am attaching screenshots of crashes from the firebase.

Image 1 (No crashes before 20th Nov)

enter image description here

Image 2 (Showing 18th Nov data)

enter image description here

Image 3 (Showing 28th Nov data)

enter image description here

TL;Dr

Day 18 = 0 Crashes in (Production + Beta)

Day 28 = 1557 in Production and 77 in Beta

User complaint: The moment they open the app, it crashes. I am not having any samsung device running Android 5.0 otherwise I would have tested it by my own.

Stacktrace

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.domain.app/com.domain.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getHost()' on a null object reference
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
       at android.app.ActivityThread.access$900(ActivityThread.java:177)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:5942)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)



Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getHost()' on a null object reference
       at android.os.Parcel.readException(Parcel.java:1546)
       at android.os.Parcel.readException(Parcel.java:1493)
       at android.content.pm.IPackageManager$Stub$Proxy.resolveIntent(IPackageManager.java:3451)
       at android.app.ApplicationPackageManager.resolveActivityAsUser(ApplicationPackageManager.java:577)
       at android.app.ApplicationPackageManager.resolveActivity(ApplicationPackageManager.java:571)
       at android.content.Intent.resolveActivity(Intent.java:5822)
       at com.domain.app.MainActivity.onCreate(Unknown Source)
       at android.app.Activity.performCreate(Activity.java:6288)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
       at android.app.ActivityThread.access$900(ActivityThread.java:177)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:145)
       at android.app.ActivityThread.main(ActivityThread.java:5942)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

PS: I am using latest version of gradle plugins. My build.gradle(app) and build.gradle(project) both are updated to latest version and there are no warnings/error in either of them. I am also not having any warnings in my AndroidManfiest.xml file. I got similar number of downloads everyday for Nov month. But crashes suddenly increased. And I updated the app last on 20 October 2018

SE_net4 the downvoter
  • 21,043
  • 11
  • 69
  • 107
  • You need to include the full stack trace from Crashlytics, as well as the code that is causing errors. Currently there is literally no way for anyone to help you. – Jake Lee Dec 06 '18 at 08:41
  • Very wild guess: an app launcher got an update which incorrectly opens your app. If possible, contact the users and ask which launcher they use. – Zun Dec 06 '18 at 08:47
  • All my users running Android 5.0 and 5.1 are having this issue. So, IMO, I don't think this might be the cause. Not all will use same launcher .. –  Dec 06 '18 at 08:48
  • Yes, because crashes is happening in different devices (different manufacturer), so I think not all manufacturer update their launcher at the same time. –  Dec 06 '18 at 08:51
  • I totally understand that. But all the users running Android 5.0 are having crashes. Not even a single device is running without any crash. So, how can all the people in this world running Android 5.0 installs the same launcher? I hope I made you understand that. I do agree with your opinion but my question never said few Android 5.0 devices are causing crash. I wrote all the devices. So, if 100 downloads happens for my app in Android 5.0, all the people are having crashes. –  Dec 06 '18 at 08:59
  • @Redman thank you for giving me idea, but I am logging `Crashlytics.log("onActivityResult");` and I can't see this log in my firebase console. So, this is also something not the case. The user complaint me the moment they open the app it crashes. So, this also makes it clear onActivityResult is safe for me. I really appreciate your thoughts. –  Dec 06 '18 at 09:02
  • Maybe you want to share the code so we can run it on our devices. You never know... – Themelis Dec 06 '18 at 09:34
  • @Skemelio The `onCreate()` alone is 2087 lines long. So, sharing a code won't be possible for me. –  Dec 06 '18 at 09:41
  • @user207421, please read my question again, if it had been duplicate, then other people would have marked it duplicate too. –  Dec 06 '18 at 10:01

0 Answers0