6

My application crashes with very poor info. Is there a way that I could find the last screen name, in google analytics, when application crashes? I am tracking every screen in my application. This way I could know in what controller the bug exists. Thanks for any help!

Edit Crash report:

NSRangeException Trace: <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> <redacted> CFRunLoopRunSpec
Lukas
  • 2,515
  • 4
  • 28
  • 37
  • How about providing the info about a crash you have and then go on from there instead of making asking for a solution that might not be the solution after all? But to answer to your question: no, it is not possible. – Kerni Dec 11 '13 at 15:47
  • That is not a proper/full crash report. If you would have a proper one and symbolicate that, you would see the class name, file name and line number the crash occurred. – Kerni Dec 11 '13 at 15:52
  • @Kerni how can I do that? When crash occurs I need to catch it then simbolicate, and send it to GA? – Lukas Dec 12 '13 at 09:17
  • 1
    No. Either you need the crash report that iOS generates and use Xcode organizer to symbolicate it or you need to get a proper crash report with a 3rd party library. See http://stackoverflow.com/questions/8233388/ios-crash-log-catch-debug-info-catch-and-send-via-email-to-the-dev-team/8242215#8242215 You did not provide any helpful information so far. Your "crash report" is none and you didn't even say how and where you got this crippled pseudo stack trace with no real information. – Kerni Dec 12 '13 at 11:47
  • 1
    @Kerni thanks for your constant help. I am using google analytics, like this [GAI sharedInstance].sendUncaughtExceptions = YES; to track crashes. And I find this crippled pseudo stack in google analytics crash reports. So my problem is that I don't understand how to trace the bug that is causing this. – Lukas Dec 12 '13 at 14:47
  • 1
    Well, I'd say that feature isn't really helpful then. `` happens when trying to fetch some system symbols on the device due to system optimisations from Apple. To get proper symbols you need to have a full iOS crash report or use a 3rd party service that works better. – Kerni Dec 12 '13 at 15:44
  • Serious question asked and you trolls just blow out the the chap asking the question? be more constructive with your comments! – theiOSDude Sep 22 '14 at 13:38

3 Answers3

25

I came across a similar situation using Google Analytics with my app. I was able to get more information from the Crashes and Exceptions page that shows all the errors by clicking on Secondary Dimension -> Engagement -> Screen Name. This shows the screen where the crash/error occurred.

Dan
  • 322
  • 3
  • 9
  • Lacking an actual bridge between Apple/XCode's symbolication and Google Analytics crash reporting, this is the best & most useful approach. This should be the accepted answer. – MandisaW Apr 18 '16 at 18:31
1

Have you tried the Crash and Exception Analysis in GA?

You can find more details about the analysis here: https://developers.google.com/analytics/devguides/collection/ios/v2/exceptions

Examples of tracking code from the page:

@try {
  NSArray *highScores = [self getHighScores];
}
@catch (NSException *exception) {
    [tracker sendException:NO // Boolean indicates non-fatal exception.
            withDescription:@"Connection timout %d: %@", connectionError, errorDescription];
}

and automatic tracking for uncaught exceptions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GAI sharedInstance].sendUncaughtExceptions = YES; // Enable 

  // ... the rest of your code, include other GAI properties you want to set.
}
Avi
  • 2,373
  • 17
  • 22
  • 1
    As the comments above now shows the developer is already doing this. See my comment above why mechanism and so also your suggestion is not helpful to find the cause of the problem: http://stackoverflow.com/questions/20520601/google-analytics-last-screen-before-crash-for-ios?noredirect=1#comment30726943_20520601 – Kerni Dec 12 '13 at 15:45
0

I faced similar issue and came across with a multi tier solution : Google Analytics provides two-way exception mechanism.

1-> manual tracking :

@try {
  NSArray *myArray = [self getListOfStudents];
}
@catch (NSException *exception) {
    [tracker sendException:NO // Boolean indicates non-fatal exception.
            withDescription:@"Unable to connect %d: %@", connectionError, errorDescription];
}

2-> Automatic tracking :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions  
(NSDictionary *)launchOptions {
  [GAI sharedInstance].trackUncaughtExceptions = YES; // Enable the automatic tracking 

  // ... rest follows here.
}

Hope this helps

iosCurator
  • 4,356
  • 2
  • 21
  • 25