Non-fatal errors not showing in Crashlytics - ios

I was testing the non-fatal error functionality of Crashlytics and can't seem to get the recorded errors to appear in Crashlytics.
I did initialize Crashlytics in AppDelegate like this:
Fabric.with([Crashlytics.self])
And I test send error like this (the test code is in viewDidLoad method):
let error = NSError(domain: "myDomain", code: 1000, userInfo: nil)
Crashlytics.sharedInstance().recordError(error)
But nothing shows up in the analytics. I tried to:
Restart application
Disconnect from debugger and run the application several times
Add regular crash using Crashlytics.sharedInstance().crash(). In that case only the fatal crash is reported
I waited 4 days for the data to show up
Versions:
Crashlytics (3.8.5)
Fabric (1.6.12)
Thanks

I found what was the problem:
The application code was embedded in a framework. My tip is that the non-fatal logs were saved in the framework's bundle not the main bundle. On the next start the main bundle was searched for logs but none was found, thus nothing was sent.
My solution was remove the app from framework as it was no longer needed in the project. I am not sure how this would be solved if you would need to keep the code in the framework.

Run the script which uploads DSYMS to Firebase. Typically this script is not executed in debug mode - check the Build Phases tab. If you use such configuration just try in AdHoc build.

Please check if you uploaded DSYM file with your build.

Related

Firebase Crashlytics not showing Logs after SDK upgrade in iOS App

My app is using Crashlytics which is moved from Fabrics to Firebase Crashlytics. My problem is that I recently upgraded firebase Crashlytics and after this upgrade there is no "Logs" displaying with crash report. I cross checked all settings and code but couldn't find any possible reason.
It was working properly before upgrade. Now all crashes are being reported properly as all the information such as "Stack Trace", "Keys" are as before but "Logs" section is empty.
My question may be an "iOS Duplicate" of this question. Anybody please tell me if there is any part of code I'm missing to get this "Logs" data.
Here is the code I setup in my AppDelegate for configuration :
FirebaseApp.configure()
FirebaseConfiguration.shared.setLoggerLevel(.min)
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(true)
Just to confirm, are you capturing log messages with Crashlytics.crashlytics().log()? See https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios#add-logs

ionic4-iOS white screen in iOS Simulator

I'm using XCode11 and ionic4. cordova version ios#5.0.0
project builds successfully using ionic cordova build ios
also successfull build in xcode
but when running on simulator, it end up showing white screen and nothing happens next. here is the console output showing the issues:
Log1
Log2
stuck on this for 4 days. checked so many suggestions on ionic blogs and nothing worked so far. I regret using ionic because its very buggy/unstable... please help
ISSUES:
-Failed to load webpage with error: the operation couldnt be completed(NSURLErrorDomain error -999)
-NSURL Connection finished with error -code -1100
-ERROR: HTTP Request(OSRequestRegisterUser) must contain an app_id parameter
-ERROR: Encountered error during push registration with OneSignal
in addition to the above errors, the iOS simulator hangs on "White Screen", the application does not load and nothing happens next.
Try this:
On your xcode, navigate to your plugin folder, locate a file named OneSignalPush.m
Inside, locate the initOneSignalObject,
add this: appId = "your-app-id-here";
right after this code:
[OneSignal setValue:#"Cordova" forKey:#"mSDKType"];
That did the trick for me.

Missing data in Fabric for IOS "Crashed: com.apple.root.default-qos"

I'm using Fabric.io to monitor and collect crash data for a IOS app.
I'm receiving now a lot of crash reports for this error "Crashed: com.apple.root.default-qos" but when I check Fabric to analyze it I got the following report:
where the stack-trace of the crash is missing.
What should I do to receive the complete stack-trace?
App uses some libraries imported using CocoaPods.
I'm attaching here also a screenshot with linked libraries:
I have discovered that this report was sent because of missing "Privacy - Face ID Usage Description" (NSFaceIDUsageDescription) in Info.plist.
I have no idea why the report was not complete, but after adding this key my app has stopped crashing.

"[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.

App paused on Splashscreen. Getting EXC_BAD_ACCESS error

I'm trying to run my game on a Iphone 6. Build process is completed but after load the game, I received the following error on DisplayManager.mm file, line: return self[targetScreen] !=nil;
Thread 1: EXC_BAD_ACCESS error (code=1,address=0xc).
DisplayManager.mm file is here.
I don't see any error on the debugger log. Objective-C Automatic Reference Counting is set to YES
I can see the Icon on my iphone, but the game crash after loading. I exported this game from Unity 5.7 and I'm running on XCode 7.3
Any recommendations are welcome, Thanks
Deactivate all plugins, rebuild the project from scratch and try adding the plugins one by one. If that still doesnt work deacrivate any byte code stripping, enable exceptions and use the MONO scripting backend instead of LLVM. (for testing)

Resources