Problem Summary
UPDATE: I have fixed the issue somehow, I am not sure how. I just deleted the Apps from my dashboard, recreated them, cleaned the Fabrics and Crashlytics Cache and after four or five times trying, it started working out of its own accord. I am still interested in knowing how did it happen and how can it actually be solved without deleting the app altogether.
TL;DR I am not receiving any stats from Answers kit and it looks like Fabric thinks Answers is not installed in my App even though it is. I am not interested in events tracking, I just need the metrics stats.
Problem Explained
Fabric Crashlytics kit comes bundled together with Answers and for most of my Apps, whenever I set up Crashlytics, Answers is set up too and I can see stats on my Fabric Dashboard.
However for a couple of my apps, I can't see the stats and it seems like Answers is disabled. The Dashboard says for viewing stats, Answers is required.
But when I look at my Fabric Mac Client, It says that for this App, Answers kit is installed and enabled.
So let's head back to the web dashboard for the App, all the options for stats are disabled except Crashlytics and the App itself is kind of greyed out unlike other Apps.
And in details it first keeps waiting for "Events" and recommends that I should make a fresh installation of the App (Which I have done a number of times now).
After a while, it says no events were received and it asks me to perform a fresh install and enable debugging mode.
My Configuration
My pod file is:
pod 'Fabric'
pod 'Crashlytics'
I am setting up my Fabric kit in AppDelegate like:
[Fabric with:@[[Crashlytics class]]];
And I have enabled the debugging mod like:
[[Fabric sharedSDK] setDebug: YES];
What I have done so far
- Made sure Answers is installed.
- Enabled debugging mode. Fabric says it can tell me if Answers is enabled and sending events but I haven't seen any log regarding it. The only three logs I receive are the version number and notifications that Settings have been downloaded and are available for consumption.
- Made Fresh Installations
- Checked logs of debugging mode which confirm that the settings for Fabric have been downloaded and are ready for consumption.
- Added Fastlane Kit to create build deliveries to see if there was some problem with communication between my App and Fabric. The Builds are showing correctly and are being uploaded correctly but again, no Answers.
I have even logged a login event even though I don't need it, just to see if it starts transmitting Answers data.
[Answers logLoginWithMethod:@"Email"
success:@YES
customAttributes:@{}];
There is also this interesting log when App runs:
[FileManager] Failed to remove file '/var/mobile/Containers/Data/Application/F055EE71-5064-4105-B41D-BD098F28DAA9/Library/Caches/com.crashlytics.data/com.sampleapp.mysampleapp/v3/launchmarker' : Error Domain=NSCocoaErrorDomain Code=4 "“launchmarker” couldn’t be removed." UserInfo={NSUnderlyingError=0x14e6a830 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}, NSFilePath=/var/mobile/Containers/Data/Application/F055EE71-5064-4105-B41D-BD098F28DAA9/Library/Caches/com.crashlytics.data/com.sampleapp.mysampleapp/v3/launchmarker, NSUserStringVariant=(
Remove
)}
It pops up whenever I attempt a fresh install after resetting the simulator. Also, check the settings json in Fabrics Data in Cache. The curious bits here:
"features": {
"collect_logged_exceptions": true,
"collect_reports": false,
"collect_analytics": false,
"prompt_enabled": false,
"push_enabled": true
}
Complete JSON can be seen here.
How can I fix this?