4

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

  1. Made sure Answers is installed.
  2. 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.
  3. Made Fresh Installations
  4. Checked logs of debugging mode which confirm that the settings for Fabric have been downloaded and are ready for consumption.
  5. 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?

NSNoob
  • 5,548
  • 6
  • 41
  • 54
  • 1
    faced same problem for a long time.I now switch to `hockeyapp` – scorpiozj May 14 '18 at 08:44
  • Sadly, I also faced the same problem. Crashlytics would log errors and crashes but Answers wont work. This pop up keeps coming up with this terrible animation of the app icon saying:"Waiting for events". Tried any solution offered over the internet. Nothing. Also, contacting support via email is a terrible customer service. It's almost like saying :"Yea, we don't really want to help you.. Just send us an email or something". I am trying HockeyApp now. As suggested by @scorpiozj. I wasted too much time on this by now and it looks like a better solution. – RawKnee Aug 17 '18 at 11:46

4 Answers4

1

Answering this in 2018 in case someone runs across it. I needed to be connected to wifi for the event to send to Fabric. Either it won't send over cellular or my phone had a bad connection. Worked immediately over wifi.

Christopher Larsen
  • 1,375
  • 15
  • 22
  • 2
    FWIW: I read on their [doc](https://docs.fabric.io/appledocs/Crashlytics/Protocols/CrashlyticsDelegate.html#tasks) `If your app is running on an OS that supports it (OS X 10.9+, iOS 7.0+), Crashlytics will submit most reports using out-of-process background networking operations. This results in a significant improvement in reliability of reporting, as well as power and performance wins for your users.` – itMaxence Nov 08 '18 at 15:10
0

I think that your AppDelegate should look like this:

[Fabric with:@[[Crashlytics class], [Answers class]]];
Pætur Magnussen
  • 901
  • 1
  • 11
  • 24
0

Mike from Fabric here. Yes, Answers is included within Crashlytics, however no data is collected until you enable it on the Fabric dashboard and accept the terms and conditions specific to Answers. What you need to do is include Crashlytics and once the app is active in your dashboard, then head to any other page in the dashboard and enable Answers from the web UI.

After that, we wait for two minutes to see if we see any event data. Usually, running a clean of your app, build and run (or un-install and re-install) will get the data sent over and then make the dashboard visible. As to why it didn't work earlier in your app, it's still unclear to me, but perhaps a race condition or one of our caches didn't propagate the data correctly.

Edit: Added a picture of what the button to enable Answers looks like.

enter image description here

Mike Bonnell
  • 16,181
  • 3
  • 61
  • 77
  • Thanks Mike, When I recreated the Apps, it did ask me if I wanted to enable Analytics and I did. For future uses, Where is the button to enable stats collection located? I could swear I didn't see any. – NSNoob Nov 16 '17 at 15:24
  • The button is available for any app outside of the Crashlytics tab in the side bar. There is an option to enable Answers for all apps or the single app you're viewing. – Mike Bonnell Nov 16 '17 at 16:03
  • 3
    I've cleaned the project cache, uninstalled an app, did all of the steps from scratch. 100% sure did everything according the doc, but Answers still doesn't works. – Stanislau Baranouski Mar 26 '18 at 08:33
  • I'd need more information to debug this. Please email support(at)fabric(dot)io with your debug log. – Mike Bonnell Mar 26 '18 at 11:59
  • @MikeBonnell Hi I am from android environment, I've enabled this real time analytics. Did all as documented. But it always shows waiting for events, nothing happens beyond.. Another issue raised after is crashes are mailed to all members but can only be seen by single admin. No issues listed for other members. What should I do now? Please guide me the way to disable it and make it work like previous. – Shree Krishna Apr 01 '18 at 10:15
  • I'm sorry but I'm not following your questions. It would probably be best to contact support(at)fabric(dot)io with more details. – Mike Bonnell Apr 02 '18 at 00:52
0

For Swift

First head to only Crashlytics manual, and Xcode

  1. I Install it on my app. then you will get 'welcome email from Crashlytics'

  2. I try to test crash event following the instruction. https://fabric.io/kits/ios/crashlytics/features

On Web UI of Fabric,

  1. I see the crash event generated.

Back to Xcode

  1. Stop debugging, And I try to delete the line of code that makes the app crashed and put Answer event trigger instead, from https://fabric.io/kits/ios/answers/features (change just one line of code) then Run again, I try to click to run the event

Go to Fabric Web UI

  1. Click to the other page of web UI e.g. Retention, Growth etc.

  2. Fabric web UI shows the term & condition request you to enable.

From now on Fabric UI is still showing 'waiting for the event'

  1. You receipt email from fabric, the detail is "Fabric analytics has just been enabled by you"

  2. Stop debugging your app from Xcode

  3. Delete your app from iPhone or simulator

  4. Click Run your app again from Xcode

  5. Try to click button generated event.

  6. Fabric UI dialogue received the trigger event.

  7. That's it. successful

This is my all step after I struggled for many hours. Hope this will help you.

Christopher Larsen
  • 1,375
  • 15
  • 22