6

Context

I am trying to test my Xamarin Forms app crash reporting on Android emulator. All Analytics function are working, however I can not see a single crash report in the server. I am using Crashes.GenerateTestCrash(); but I also produced real crashes too.

From the diagnostics it seems the device does not even sends the crash information to the server.

Question

What am I missing? or What else should I try?

Diagnostics and what I have tried so far

  • First of all, I've carefully read the Troubleshooting on page https://docs.microsoft.com/en-us/mobile-center/sdk/troubleshooting/xamarin paragraph 'Crashes don't show up in the portal'

  • I know that I must start the app again, to send the crash info

  • I have turned on verbose logging: MobileCenter.LogLevel = LogLevel.Verbose; It seems everything is initialized OK, including 'Set up Xamarin crash handler'
  • Examined the console verbose output, there are correct JSON analytic data transfers, however there are no traces any crash related
  • Manually debugged and checked the line Crashes.GenerateTestCrash(); is executing.
  • In OnStart I also checking the prev crash:

    // Returns false: bool didAppCrash = Crashes.HasCrashedInLastSessionAsync().Result; ErrorReport crashReport = Crashes.GetLastSessionCrashReportAsync().Result;

Console log parts

09-19 10:10:14.036 I/MobileCenterCrashes( 3173): Set up Xamarin crash handler.
09-19 10:10:14.064 F/MobileCenter( 3173): Mobile Center SDK configured successfully.
...
09-19 10:10:14.081 D/MobileCenter( 3173): checkPendingLogs(group_core) pendingLogCount=0
09-19 10:10:14.081 D/MobileCenter( 3173): Mobile Center storage initialized.
09-19 10:10:14.081 D/MobileCenter( 3173): checkPendingLogs(group_analytics) pendingLogCount=0
09-19 10:10:14.082 D/MobileCenterAnalytics( 3173): Loaded stored sessions: {...}
09-19 10:10:14.083 I/MobileCenter( 3173): Crashes service started.
09-19 10:10:23.815 V/MobileCenter( 3173): Calling https://in.mobile.azure.com/logs?api_version=1.0.0-preview20160914...
09-19 10:10:23.815 V/MobileCenter( 3173): Headers: {Install-ID=..., App-Secret=...}
09-19 10:10:23.817 V/MobileCenter( 3173): {
09-19 10:10:23.817 V/MobileCenter( 3173):   "logs": [
09-19 10:10:23.817 V/MobileCenter( 3173):     {
09-19 10:10:23.817 V/MobileCenter( 3173):       "type": "start_session",
09-19 10:10:23.817 V/MobileCenter( 3173):       "timestamp": "2017-09-
... and so on...
Brandon Minnick
  • 11,396
  • 12
  • 55
  • 108
g.pickardou
  • 24,276
  • 25
  • 91
  • 195
  • Are you using all Crashes API after MobileCenter.Start? What are the full verbose logs looking like for the crash run (not the restart one)? – Guillaume Perrot Sep 19 '17 at 18:10
  • This is the crash session, not the restart – g.pickardou Sep 20 '17 at 14:21
  • Ok but the logs in the question is just a very small subset of what the dev team needs to look at to investigate. We need the full logs. – Guillaume Perrot Sep 20 '17 at 19:21
  • I'm having same issue on Xamarin.Android on Android emulator on Windows. Analytics appear but nothing in crashes. I finally saw all my crashes appear in App Center - Crashes after I closed the app in the emulator (i.e. click "overview" and then click 'x') and then restarted the app in emulator. I've repo'ed this several times to be certain this is the action that sends the crash reports (at least for me). Happy to send any logs. – saraford Dec 10 '17 at 23:38
  • As @saraford recommends, clicking 'overview' (as in, show all open apps?) and clicking the x button on an app then causes all the crashes to show up. Is this absolutely necessary to have all crashes logged? – Chucky Jun 06 '18 at 13:28
  • You seem to be using old version of App Center SDK (several changes have been made since the LogTag changed from MobileCenter to AppCenter). Can you check whether updating helps? Also, make sure you are not in debug session - the way we collect information about crashes would not work if there's a debugger attached. – Dmitrii Chichuk Dec 18 '19 at 14:50

0 Answers0