"[Crashlytics:Crash] Reporting is disabled"

I am getting the following error messages when our production iOS app initializes:

[Crashlytics] Version 3.8.4 (121)
[Crashlytics] Running on iOS Simulator (iPhone), 10.3.0 (16E195) 
[Crashlytics:Crash] Reporting is disabled 
[Crashlytics] Crash reporting could not be initialized 
[Answers] Initialized 
[Fabric] Initialized with kit versions: {
    "com.twitter.answers.ios" = "1.3.4"; 
    "com.twitter.crashlytics.ios" = "3.8.4"; 
    "io.fabric.sdk.ios" = "1.6.11"; 
}

Every subsequent call to log an event gets the following error:

[Crashlytics:Crash] WARNING: CLSLog has been used before (or concurrently with) 
    Crashlytics initialization and cannot be recorded. The message was: ...

The non-production versions of the app work fine running the exact same code but with different bundleIDs. Normally when the app initializes for the first time, then I see the app populate in the Fabric dashboard, but in this case the app is not showing up.

We have an Android and an iOS version of the app, and they both use the same bundleID, so I am wondering if there is a conflict because of that? I see the Android version of the app in the dashboard, and it seems to be working properly. This is an app that originally was a Xamarin app that compiled to both platforms, neither of which incorporated Fabric/Crashlytics. We have now written native apps on each platform, and both are using Fabric/Crashlytics.

Since this is a pre-existing app in both stores, we do not have the option of changing either app’s bundleID.

Make sure you initialize Crashlytics with Fabric before calling any Crashlytics methods:

Fabric.with([Crashlytics.self])

One step I routinely miss is to make sure you've added the build phase on your target:

"${PODS_ROOT}/Fabric/run" ${FABRIC_API_KEY} ${FABRIC_BUILD_SECRET}

and either replace ${FABRIC_API_KEY} and ${FABRIC_BUILD_SECRET} with your key and secret or add custom build settings for each.

There are apparently cases where Crashlytics does not auto-activate new apps so that they show up under your list of apps, even though everything is coded correctly and data is going to their servers. In this case, send an email to Crashlytics support (support@fabric.io) that contains a copy of the info.plist entries for the app in question and they will activate it for you. I have had to do this several times, especially with app extensions.

When I finally traced it down in my situation, the error was entirely correct, but not obvious.

I saw these errors in various testing targets where the code we tested was using a custom logging wrapper which called CLSNSLogv(), but the test didn't actually go through the AppDelegate and therefore did NOT initialize Crashlytics. After trying a few things I was convinced that it worked when executed as an app, but in our configuration it was not working under the unit test configuration.

I'll likely alter our custom wrapper to bypass CLSNSLogv() during testing anyway. The biggest benefit of using that is when crashes occur on devices, so we won't be missing anything.

Comments
  • The problem I was having was actually a problem on the Crashlytics servers. It was fixed in short order with a phone call. Using the same bundleID on iOS and Android is not a problem.
  • I have the exact same problem. It works erratically, and the build log suggests there was no difference between the time CLS was enabled and disabled. I'll have to make a call too...
  • I have the same problem with Version 3.10.1 (129). And every time I use CLSLog I've got an error: WARNING: CLSLog has been used before (or concurrently with) Crashlytics initialization and cannot be recorded. Any solution?
  • @ArtFeel, as I mentioned previously, in my case I had to open a ticket with Crashlytics, then when they called me back I had a short conversation with the support person and they changed some setting on their server that fixed the problem. Everything in my code was fine. I am not sure exactly what change they made. Good luck!
  • If you are using Firebase you shouldn't need to do this anymore going by the docs.