Incomplete Crash Report from Google - android

I have a crash report from Google showing this:
Whereas in logcat, I would see something like this:
FATAL EXCEPTION: main
Process: com.myscrap, PID: 1929
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1775)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Why do I not see the Context.startForegroundService() did not then call Service.startForeground() part in Google's crash report? I would think this is an essential part of the log.

It takes time to see recent occurring crash in Google play dashboard. Here you're seeing two different crash logs of two different crashes. To find same crash in Google dashboard Apply filters like duration(date) and device branding to find your crash.
Also better to use Firebase Crashlytics for crash reporting in your app.

Related

Google Play reported app crash but did not point out where

Yesterday I uploaded my aab file to google play for a open testing. Google Play did report some app crashes in my app but it was not really clear, like below:
FATAL EXCEPTION: main
Process: com.boss.theblockhousev2, PID: 25729
java.lang.NullPointerException: throw with null exception
at g.c.a.j.a.h.g.b(:7)
at m.b.run(:1)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Detected on 1 device during testing:
Nokia Nokia 1
480x854
Android 8.1 (SDK 27)
1,024 MB
ARM_V7
en_US
How can I find my bug now? Please help.
Thank you guys a lot!
Use Firebase Crashlytics for that. It will tell you all the information like:-
Line of Code where the crash happened.
Exception
On Which Device
the crash occured, etc.

Context.startForegroundService() did not then call Service.startForeground() on Samsung devices

I have an issue with background working of service on Samsung devices.
Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1881)
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(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Of course, after starting the service I call Service.startForeground() and there are no problems on other devices just only Samsung device.
Is anybody know the reason and how to work around of this issue?
I have found similar problem in Zopim SDK https://chat.zendesk.com/hc/en-us/community/posts/360004395368-Crash-on-Android-8-in-Android-SDK-1-4-2
Fixed in 1.4.4
Fixed a bug in the ChatWidgetService lifecycle handling
that caused RemoteServiceException.
https://developer.zendesk.com/embeddables/docs/android-chat-sdk/releasenotes#version-1.4.4

NPE on com.android.server.autofill.RemoteFillService$PendingRequest.cancel()

Crashlytics is reporting NullPointerException related to Auto Fill as shown below:
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method
'boolean com.android.server.autofill.RemoteFillService$PendingRequest.cancel()' on a null object reference
at android.os.Parcel.readException(Parcel.java:1965)
at android.os.Parcel.readException(Parcel.java:1905)
at android.app.IActivityManager$Stub$Proxy.reportAssistContextExtras(IActivityManager.java:8297)
at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3210)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Caused by android.os.RemoteException: Remote stack trace:
at com.android.server.autofill.RemoteFillService.cancelCurrentRequest(RemoteFillService.java:177)
at com.android.server.autofill.Session.cancelCurrentRequestLocked(Session.java:465)
at com.android.server.autofill.Session.access$1000(Session.java:118)
at com.android.server.autofill.Session$1.onHandleAssistData(Session.java:322)
at com.android.server.am.ActivityManagerService.reportAssistContextExtras(ActivityManagerService.java:14713)
However, the stack does not include anything from my app yet crash is happening on my side.
This is not an issue with your app but with specific Android OEMs. Seems to be happening more frequently on Samsung Devices and not seen on Pixel Devices. Here is an issue report to Google which is closed as 'Won't Fix'.
https://issuetracker.google.com/issues/123311621
Since the crash is happening because of autofill. I would recommend disabling autofill for the specific view by setting importanForAutofill as false/no.
https://developer.android.com/reference/android/R.attr.html#importantForAutofill

NullPointer on toLowerCase but I don't use that method anywhere

I'm getting the following crash dump in Firebase Crash Reports:
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
bnp.run (bnp.java:56)
java.lang.Thread.run (Thread.java:818)
The problem is that I don't use the String.toLowerCase() method anywhere in the project. In Android Studio, I did Edit->Find In Path for the method and got no results, however, it does appear 100+ times if I search in the libraries. But I cannot find the "bnp.java" anywhere.
Thanks for your help!
Edit: A previous crash report was not proguard-affected and revealed it may be due to google-play-services or Firebase. I only use gms:play-services-places and gms:play-services-auth in my app, along with many Firebase dependencies.
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
bnp.run (:com.google.android.gms.DynamiteModulesC:56)
java.lang.Thread.run (Thread.java:818)
I can't comment yet, so I will post this as a possible solution, but this seems like an error on Google's side. Multiple people are reporting this crash on the exact same device with the exact same region. So it seems Google runs your app on a virtual or automated device and then that device crashes. This device seems to be a Nexus 5x with local us-US and API level 23.
Source: https://code.google.com/p/android/issues/detail?id=233549
I got this error when my code was trying to create a connection to certain amqp service using an invalid URL. Once I modified it to the proper value, the exception is gone. So check your code.
My app ran into a similar issue.
When launched in Stock android devices(Mi A1), the App crashed with " keeps stopping popup". The Crashlytics in Fabric reported it as the
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
at bfx.run(:com.google.android.gms.dynamite_dynamitemodulesc#13452060#13.4.52 (040708-202483333):80)
at java.lang.Thread.run(Thread.java:818)
But when I checked the Pre-launch report of the Release management in Google Play Console, it showed that the app was crashing for Pixel & Pixel 2 for an entirely different reason. The issue shown was
FATAL EXCEPTION: main Process: in.quickall.quickall, PID: 8345
java.lang.RuntimeException: Unable to start activity ComponentInfo{in.quickall.quickall/in.quickall.quickall.Main.MainActivity}: android.content.res.Resources$NotFoundException: Drawable in.quickall.quickall:drawable/splash_screen with resource ID #0x7f0700c0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
And the issue started from the APK version were I implemented the code (given below) to remove the white screen on launch.
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">#drawable/splash_screen</item>
</style>
I removed this piece of code and now the Pre-launch report shows it as working fine in the Pixel devices.
Now the app launches correctly, but has to have the white screen at launch.

Need Stacktrace error logs from Debug Android App without Google Play

I need the Error logs with stack trace from my users with my Android App (Debug, deployed via DeployGate). I've tried DeployGate SDK and RemoteLogCat. RemoteLogCat and DeployGate only send Log messages that I've put in myself, but I need the current LogCat data (as if it would be hooked up to my own PC) with LogLevel "Error".
This is what I need:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: www.myapp.nl.simpelfragmentvoorbeeld, PID: 5020
java.lang.RuntimeException: NullPointerException
at www.myapp.nl.MainActivity$1.onClick(MainActivity.java:87)
at android.view.View.performClick(View.java:5197)
at android.view.View$PerformClick.run(View.java:20926)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5944)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.
run(ZygoteInit.java:1389)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1184)
Many thanks guys!
The solution is using ACRA
ACRA is a library enabling Android Application to automatically post their crash reports to a GoogleDoc form. It is targetted to android applications developers to help them get data from their applications when they crash or behave erroneously.

Categories

Resources