Flurry Analytics Crash Reporting iOS - Not Logging Crashes

Anything libgdx related goes here!

Flurry Analytics Crash Reporting iOS - Not Logging Crashes

Postby StuDapples » Tue Sep 26, 2017 9:18 am

I am trying to get Flurry Analytics Crash reporting working for iOS using Robopods.

Flurry dashboard is successfully logging every session when the app is launched (in realtime) but not the crashes. It has now been almost 24 hours since I purposefully caused the app to crash on a number of occasions.
After the crash occurs I reopen the app and hide it again. (I have not yet determined at which point in the application lifecycle that the crash data is supposed to be sent, so trying to cover all bases here.)

I have been following the information at:
https://github.com/MobiVM/robovm-robopods/tree/master/flurry/ios-analytics

Has anyone else had problems with getting any crash reporting from Flurry and if you know how to overcome this problem?
I would be grateful if anyone has any useful info.

I have set up my project as below and I am running this on an physical iPad. Is there anything I have missed in the code or elsewhere?

Many thanks

Stu

In my project level build.gradle file:

Code: Select all
buildscript{
   ...
   dependencies{
      ...
      classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.1'
   }
}
...

project(":ios") {
...
   dependencies {
   ...
   compile "com.mobidevelop.robovm:robopods-flurry-ios-analytics:2.2.1"   
   }
}



In IOSLauncher.java:

Code: Select all
protected IOSApplication createApplication() {
        IOSApplicationConfiguration config = new IOSApplicationConfiguration();
        ...

        Flurry.enableCrashReporting();
        Flurry.startSession("My API KEY"); // Where I have my unique app api key code.


        return new IOSApplication(new Game(), config);
    }



Then in one of my game screens I have added an exception:

Code: Select all
throw new RuntimeException("This is a crash");



Here is some of the output from the debug logs, which may perhaps indicate that the former crash may be being sent. But I can't find anything in the API documentation that relates specifically to these notices and to "Add crashed former session":

Code: Select all
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Add crashed former session
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Event logging enabled[1]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Session reports on close enabled[1]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Session reports on pause enabled[0]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Crash reporting enabled[0]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Initialized session from scratch with startTime[Mon Sep 25 16:21:04 2017]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Created active session with API[******************]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Session reports on close enabled[1]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Session reports on pause enabled[1]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Event logging enabled[1]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Crash reporting enabled[1]
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: dealloc session
Sep 25 16:21:04 Stuarts-iPad IOSLauncher[395] <Notice>: FlurrySession: Initial timestamp[Mon Sep 25 11:27:51 2017] from secure source
StuDapples
 
Posts: 15
Joined: Mon Sep 25, 2017 1:31 pm

Re: Flurry Analytics Crash Reporting iOS - Not Logging Crash

Postby StuDapples » Wed Oct 25, 2017 6:54 pm

Okay, so I've worked out why crash reporting isn't working, but how to make it work for iOS?

When importing Flurry into the project using gradle:
Code: Select all
compile "com.mobidevelop.robovm:robopods-flurry-ios-analytics:2.2.1"

It uses Flurry SDK version 7.6.6.

The FAQs on the Flurry website state:
Crash Analytics requires Flurry iOS SDK version 7.8.0 or higher.
If you are using an older version, you will need a new SDK.

So this is the reason why crashes are not appearing in the Flurry dashboard.

Is it possible to update the version being downloaded by the robopod? Does this require any extra coding?
The current SDK available from the Flurry website for iOS is 8.3.1

I have tried to add the latest SDK into libs/ folder in the iOS project and added this to the robovm.xml file:
Code: Select all
<config>
    ...
    <libs>
        <lib>libs/libFlurry_8.3.1.a</lib>
    </libs>
</config>

However this reports errors saying duplicate symbols, here is a small sample:

Code: Select all
[color=#FF0000]25/10/17 19:31:10: [ERROR]     /Users/stu/.robovm/cache/ios/arm64/release/Users/stu/.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robopods-flurry-ios-analytics/2.2.1/ee86df07bc3778c7ba2317ecea57db0a8396701f/robopods-flurry-ios-analytics-2.2.1.jar.extracted/META-INF/robovm/ios/libs/libFlurry.a(PLCrashReportRegisterInfo.o)
25/10/17 19:31:10: [ERROR]     /Users/stu/eclipse-workspace/MainGame/ios/libs/libFlurry_8.3.1.a(PLCrashReportRegisterInfo.o)
25/10/17 19:31:10: [ERROR] duplicate symbol _OBJC_CLASS_$_FlurryPLCrashReportSymbolInfo in:
25/10/17 19:31:10: [ERROR]     /Users/stu/.robovm/cache/ios/arm64/release/Users/stu/.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robopods-flurry-ios-analytics/2.2.1/ee86df07bc3778c7ba2317ecea57db0a8396701f/robopods-flurry-ios-analytics-2.2.1.jar.extracted/META-INF/robovm/ios/libs/libFlurry.a(PLCrashReportSymbolInfo.o)
25/10/17 19:31:10: [ERROR]     /Users/stu/eclipse-workspace/MainGame/ios/libs/libFlurry_8.3.1.a(PLCrashReportSymbolInfo.o)
25/10/17 19:31:10: [ERROR] duplicate symbol _OBJC_IVAR_$_FlurryPLCrashReportSymbolInfo._endAddress in:
25/10/17 19:31:10: [ERROR]     /Users/stu/.robovm/cache/ios/arm64/release/Users/stu/.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robopods-flurry-ios-analytics/2.2.1/ee86df07bc3778c7ba2317ecea57db0a8396701f/robopods-flurry-ios-analytics-2.2.1.jar.extracted/META-INF/robovm/ios/libs/libFlurry.a(PLCrashReportSymbolInfo.o)
25/10/17 19:31:10: [ERROR]     /Users/stu/eclipse-workspace/MainGame/ios/libs/libFlurry_8.3.1.a(PLCrashReportSymbolInfo.o)
25/10/17 19:31:10: [ERROR] duplicate symbol _OBJC_IVAR_$_FlurryPLCrashReportSymbolInfo._startAddress in:
25/10/17 19:31:10: [ERROR]     /Users/stu/.robovm/cache/ios/arm64/release/Users/stu/.gradle/caches/modules-2/files-2.1/com.mobidevelop.robovm/robopods-flurry-ios-analytics/2.2.1/ee86df07bc3778c7ba2317ecea57db0a8396701f/robopods-flurry-ios-analytics-2.2.1.jar.extracted/META-INF/robovm/ios/libs/libFlurry.a(PLCrashReportSymbolInfo.o)
25/10/17 19:31:10: [ERROR]     /Users/stu/eclipse-workspace/MainGame/ios/libs/libFlurry_8.3.1.a(PLCrashReportSymbolInfo.o)[/color]


What can I do? Could you give me a nudge in the right direction please? Thanks.
StuDapples
 
Posts: 15
Joined: Mon Sep 25, 2017 1:31 pm

Re: Flurry Analytics Crash Reporting iOS - Not Logging Crash

Postby obigu » Wed Oct 25, 2017 11:39 pm

This is one of the few RoboPods that still embed the library which is a problem when they're not mantained.
As a fix you can build locally a modified version of the RoboPod by deleting the .a library as well as editing the robovm.xml not to use it removing the following

Code: Select all
<libs>
        <lib>libs/libFlurry.a</lib>
 </libs>


Then edit your own robovm.xml and add a reference to the desired .a Flurry lib you copy in your project.

My personal recommendation would be to disable crash reporting on Flurry and to integrate Crashlytics, which is way better :)
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm

Re: Flurry Analytics Crash Reporting iOS - Not Logging Crash

Postby StuDapples » Thu Oct 26, 2017 10:16 am

Thank you so much obigu :D

I will attempt to build a local modified version of the RoboPod for Flurry.

Does the RoboPod for Crashlytics currently work on iOS? I had tried to use that before Flurry without success.
If it works then I would definitely prefer Crashlytics, I have implemented that in the Android version of my game and the dashboard and reporting system seems more robust and a lot more professional.

Thanks again.
StuDapples
 
Posts: 15
Joined: Mon Sep 25, 2017 1:31 pm

Re: Flurry Analytics Crash Reporting iOS - Not Logging Crash

Postby obigu » Fri Oct 27, 2017 12:48 am

Yes it does. Make sure you follow the readmes https://github.com/MobiVM/robovm-robopo ... ter/fabric, including the Xcode dummy project for the first crash report.

If you have any issues feel free to ask in MobiVM Gitter https://gitter.im/MobiVM/robovm
obigu
 
Posts: 108
Joined: Fri Aug 02, 2013 4:47 pm

Re: Flurry Analytics Crash Reporting iOS - Not Logging Crash

Postby StuDapples » Fri Oct 27, 2017 9:56 pm

I managed to set up Crashlytics and get my first unsymbolicated crash, so I'm so glad to be making progress after being stuck for so long!

Thank you Obigu.
StuDapples
 
Posts: 15
Joined: Mon Sep 25, 2017 1:31 pm

Re: Flurry Analytics Crash Reporting iOS - Not Logging Crash

Postby kokoNuts » Fri Jul 13, 2018 2:43 pm

I faced the same problem. This is the solution:
You also need to configure Robovm to report uncaught exceptions as crashes. Call org.robovm.apple.foundation.NSException#registerDefaultJavaUncaughtExceptionHandler in com.badlogic.gdx.backends.iosrobovm.IOSApplication.Delegate#didFinishLaunching.

It might be too late for you :) but it is valuable for others.
kokoNuts
 
Posts: 9
Joined: Fri Jun 13, 2014 9:36 pm


Return to Libgdx

Who is online

Users browsing this forum: Exabot [Bot], Majestic-12 [Bot] and 1 guest