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.
Related
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.
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.
I followed this guide to integrate a check into my app to prevent crashes at runtime when using Android App Bundles (for missing resources).
I added the following code to my application class in the onCreate() method before the super call:
if (MissingSplitsManagerFactory.create(this).disableAppIfMissingRequiredSplits()) {
// Skip app initialization.
return
}
This works without issues on my own test device. However, if I upload the Android App Bundle to Google Play, some of the devices in the Pre-launch report give this exception:
FATAL EXCEPTION: main
Process: com.example, PID: 25603
java.lang.RuntimeException: Unable to create application com.example.App: java.lang.RuntimeException: Package manager has died
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4858)
at android.app.ActivityThread.access$1600(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1423)
at android.os.Handler.dispatchMessage(Handler.java:102)com.example
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5585)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by: java.lang.RuntimeException: Package manager has died
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:136)
at Cfa.a(SourceFile)
at com.example.App.onCreate(SourceFile:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4855)
... 8 more
Caused by: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:503)
at android.content.pm.IPackageManager$Stub$Proxy.getPackageInfo(IPackageManager.java:2215)
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:131)
... 12 more
After some searching I found out that this issue is not related to the Play Core library, but to the Android package manager. It looks like the Play Core library uses the package manager to check if there are missing splits. I don't know how I can fix this issue as this exception is outside my code, so I would appreciate any help finding a solution.
I am using react native. I am getting the crashes on crashlytics with the error INVALID_STATE_ERR.I am using FireBase Crashlytics. I am also using MQTT client for making web socket connection.
I am not able to figure out the reason of crashing the app. Is it due to the MQTT WebSockets or due to the error occurring on javascript thread? I am also not getting any relevant message from the stack trace either.
I am pasting my Stack Trace below.
Fatal Exception: com.facebook.react.common.JavascriptException: INVALID_STATE_ERR, stack:
value#79:1340
_socket_send#557:21101
_on_socket_open#557:16408
<unknown>#557:628
value#63:1501
<unknown>#79:4566
value#32:1363
value#18:3559
<unknown>#18:1044
value#18:2986
value#18:1016
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Method.java)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:148)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:818)
Can I get more insight to fix this issue?
According to this Wix GitHub issue, it is caused by:
Too many views on older phones. RNN added a few nested views, but it appears I may have too many anyways.
That issue links to a pull request on React Native's GitHub repo, which should now be merged in. It mentions the issue is on pre-API 21, so I suggest you try your code on later APIs and see if it persists.
Either way, reducing the number of views (or requests, in this case?) seems a good first step.
I'm trying to run an android xamarin app in Visual Studio 2013, it deploys normally, but crashes after start.
Here is the log:
java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_22 or Xamarin.Android.Pla
at android.app.ActivityThread.installProvider(ActivityThread.java:5002)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4594)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4534)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
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:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.Platform.ApiLevel_22 or Xamarin.Android.Platform!
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:38)
at android.app.ActivityThread.installProvider(ActivityThread.java:4999)
... 11 more
Caused by: android.content.pm.PackageManager$NameNotFoundException: Xamarin.Android.Platform
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:281)
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:32)
The same thing on emulator with any platform and device.
Thank you in advance.
With the last Xamarin Update i run into this problem as well.
Try disabling "Use shared runtime" in your Android Build options. It seems with the current Version a developent build is not able to call into the shared mono runtime.
--> https://forums.xamarin.com/discussion/52439/unable-to-get-provider-mono-monoruntimeprovider
What helped some others:
Some suggested to just change "Target Version" (and "Compile Version" for VS) and Rebuild. The important part was to have changes in the Project File and not what exactly you changed "Target Version" from and to.
--> https://stackoverflow.com/a/32607524/383658