Crash Reporting

Its worked!
Regards :heart_eyes:

Dear @matis11,

In this post , step 17 you use class_objc_static() method of Crashlytics but in MOE 2.x this method has been removed.
I use Crashlytics.alloc().init() in my project and its worked.

Regards,
Saeed.

2 Likes

Great, thank you for sharing it here :slight_smile:

Is this still the recommended way to implement crashlytics with moe 1.3?

I saw some mentions in 1.3 about pregenerated bindings but haven’t found much documentation on how to use them. Do I simply copy files from the example projects at https://github.com/multi-os-engine/moe-bindings ?

I’ve followed the steps in post 10 above and the pod generation appeared to work. However, when I run it on my device I get a crash during launch.

2017-09-24 19:35:10.145714+0930 hoplite[522:155195] [DYMTLInitPlatform] platform initialization successful
art I   522 155010 /Volumes/SSD/Android/moe-final/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /var/containers/Bundle/Application/6BB6EAB3-FAE2-4C32-B3C7-90E032DB92E8/hoplite.app/application.jar:/var/containers/Bundle/Application/6BB6EAB3-FAE2-4C32-B3C7-90E032DB92E8/hoplite.app
/Volumes/SSD/Android/moe-final/moe/natj/natj/src/main/native/natj/NatJ.cpp:353 DEBUG: Method 'boolean java.lang.reflect.Method.isDefault()' is not accessible.
2017-09-24 19:35:10.619832+0930 hoplite[522:155010] [Crashlytics] Version 3.8.6 (124)
SQLiteLog 6 (1) no such table: cfurl_cache_response

SQLiteLog 6 (1) no such table: cfurl_cache_response

2017-09-24 19:35:10.685349+0930 hoplite[522:155010] refreshPreferences: HangTracerEnabled: 0
2017-09-24 19:35:10.685596+0930 hoplite[522:155010] refreshPreferences: HangTracerDuration: 500
2017-09-24 19:35:10.685843+0930 hoplite[522:155010] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
2017-09-24 19:35:10.686853+0930 hoplite[522:155010] *** Terminating app due to uncaught exception 'java.lang.NullPointerException', reason: 'java.lang.NullPointerException: Attempt to invoke virtual method 'void com.badlogic.gdx.backends.iosmoe.IOSApplication.didBecomeActive(apple.uikit.UIApplication)' on a null object reference
	at com.badlogic.gdx.backends.iosmoe.IOSApplication$Delegate.applicationDidBecomeActive(IOSApplication.java:79)
	at apple.uikit.c.UIKit.UIApplicationMain(Native Method)
	at com.magmafortress.hoplite.IOSMoeLauncher.main(IOSMoeLauncher.java:56)
'
First throw call stack:
(0x1862afd38 0x1857c4528 0x10a236b78 0x10a23c66c 0x10a260e38 0x10a24c1b4 0x18f7406cc 0x190099a5c 0x19022efc8 0x190099870 0x18fe83850 0x18fd28bd8 0x18895221c 0x10aa5d45c 0x10aa69b74 0x188985a04 0x1889856a8 0x188985c44 0x186258358 0x1862582d8 0x186257b60 0x186255738 0x1861762d8 0x188007f84 0x18f722880 0x10a24c044 0x10a2606c0 0x10a23e084 0x10a23df24 0x10a23efe8 0x10a260e38 0x10a24c1b4 0x111199cf4 0x109f56dc0 0x109f9d8c4 0x109f9d604 0x10a04a954 0x109d31fa8 0x10a0edc4c 0x109d30284 0x104cd32ac 0x185c9a56c)
libc++abi.dylib: terminating with uncaught exception of type ObjCException

I’m initialising crashlytics as done in step 17 and not doing anything with didBecomeActive or applicationDidBecomeActive in my code.

Has anyone come across this issue or know how I might get around it?

Does anyone have an example how to call org.moe.binding.crashlytics.c.Crashlytics.CLSLog(@Mapped(value=ObjCStringMapper.class) String format, Object… varargs) and its variants CLSNSLog and CLSLogv methods from Java?

MagmaFortress, I’m pretty sure you can just declare those bingings as your gradle dependencies - org.multi-os-engine.binding.ios:crashlytics:3.8.3 and you still need pod 'Crashlytics', '3.8.6' in your Podfile to get frameworks into your app as explained above. I’m initializing Crashlytics in my main app class in applicationDidFinishLaunchingWithOptions(..) method:

Fabric.with(NSArray.arrayWithObjects( //
    			Crashlytics.class_objc_static(), //
    			Answers.class_objc_static(), //
    			null));