Crashlytics crashing TestFlight app, without any crash log found - ios

I found that calling to latest Fabric Crashlytics 3.7.0
[Fabric with:#[[Crashlytics class]]];
causes my app to close / crash, but only when the app was distributed with TestFlight... it doesn't happen, even when build with release
It is the first thing called in didFinishLaunchingWithOptions, as i found out it is crashing the app, i moved it to another part of code, when a button is pressed and it crashed / closed the app
The problem is, i cannot find any trace of a crashlog nowhere, not in Settings -> Privacy... not when attaching to XCode and looking at the console

I had a separate target for the AppStore distribution and looks like i forgot the Fabrics entry in the plist

Related

Firebase crashlytics not reporting crash

I'm upgrading from Fabric to Firebase crashlytics. I've added Firebase and Fabric/Crashlytics pods to my project, added the .plist etc. All seems to be working fine, except crashes are not being reported. I'm generating a crash using assert(! "crashing on purpose to test crashlytics"); as I saw someone else mention [[Crashlytics sharedInstance] crash] didn't work for them.
What's interesting is the 'crash free users' for the build number I'm using drops to 0% after the crash is generated, but crashes is reported as 0. The dSYMs tab doesn't list the version number.
Here's the crash coming through on the debug view when -FIRDebugEnabled is passed as an argument:
Any suggestions?
I had a similar issue when migrating from Fabric to Firebase Crashlytics. You should not follow the Firebase website instructions. Stick with the Fabric instructions as mentioned by #Ashvini. I am assuming that you already had Crashlytics working fine before migration to Firebase. I tested this approach and it works for me.
This is a pain as older and newer projects will have different Crashlytics implementations.
After installation make sure you have initialized Fabric SDK in your AppDelegate file by using below line of code:
For Objective-C : [Fabric with:#[[Crashlytics class]]]; and
For swift : Fabric.with([Crashlytics.self])
After that force your app to be crash by calling Crashlytics.sharedInstance().crash() for swift and [[Crashlytics sharedInstance] crash] for Objective-C. Call this method by adding any button programmatically in your ViewController or on existing action.
Crashlytics doesn’t capture crashes if a debugger is attached at launch, so to see the crash in action you'll need to follow these steps:
Run your app from Xcode to install it on the simulator or your device
Press the Stop button in Xcode to quit it
Launch your app from the home screen to run it without the debugger
Press the “Crash” button to trigger the crash
Run the app again from Xcode so it can deliver the recorded crash to Crashlytics.
Within a few minutes, you should see the crash appear on your Fabric Dashboard.
If you didn't found crash in dashboard then Double-check in your Build Settings that your Debug Information Format is “DWARF with dSYM File” for both Debug and Release.
Make sure to launch the app after crashing it, so that the crash can be uploaded.
If you don’t see the crash after a few minutes, run your app again to retry crash delivery.
You can refer to this link [https://fabric.io/kits/ios/crashlytics/install] .
See that you have the latest pods installed, as the firebase docs says you should have this pod versions
pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'
Here is the link to the docs of firebase crashlitycs

Fabric/crashlytics crash not showing up in main list, but listed

We are using Fabric/Crashlytics in our iOS app. Generally, our installation seems to be working well, with crashes from debug builds reporting, but we seem to have some odd problems with AdHoc builds.
I cause an exception to occur in the code.
exit the app, restart it.
Go to Fabric dashboard.
If I go to current release (56), I can see the crash I caused noted as '1 crashes' in the screen:
Fabric knows about the crash
Now, if I click the link for 'All issues for 1.0 (56)', it shows me no crashes:
But it is not available to view or select
I have tried waiting a day for these to show up, and they do not. And, I have seen crashes on other devices not showing up as well.
When I caused this crash, Fabric correctly noted that the DSYMs for this build were missing (ADhoc build), so I found them from the archived, zipped them, and uploaded them. That warning went away.
But, the crash is not reported in the main list.
DSYMs are loaded
I have reviewed various posts with other people having problems with Crashlytics. I have made sure the Fabric initialization is correct, and after other packages (like Dacebook and Twitter):
[Fabric with:#[[Crashlytics class]]];
The build scripts for debug and release are set to DWARF with dsyms.
We have the Fabric run script with our API key in the XCode run script for our target.

iOS - Crashlytics - missing several crashes

I have problem with Crashlytics (and with crashes shown in Xcode -> Organizer) because I don't see many of crashes that I should. From testers I should have many crashes there but I don't have. I logged into iTunes Connect and get zipped dSYM files there and upload them to Crashlytics to see new crashes. But even if it said that there is one or more new crash after upload dSYM I dont see any new crash. It looks like most of crashes I dont see in Crashlytics. Why is that? I need to get logs/crashes from devices that runs app from TestFlight. I think with Objective-C and before bitcode it worked much better.
Edit:
Is it possible that in another tool (from 3rd party company) there would be crashes that aren't in Apple Organizer? I am asking if I should try more tools from other companies. Maybe some of crashes are because of memory. Is it possible that these crashes aren't in reports?
Thanks
Fabric shows 1 crash 'row' for each crash, the number of crashes is in the same row.
But remember, crashes are only send to crashlytics if the user opens the app again.
You could also test Crashlytics by using:
Crashlytics.sharedInstance().crash()
First make sure you have uploaded your dsym files to your crashlytics dashboard, Check this
Click on the encircled part
Then on your Xcode > Window > Organizer
Tap Download dSYMs, When the download is complete right click your Archive and click Show in Finder, then right click the package and tap Show Package Contents
Open the dSYMs folder, then you can just drag and drop those dSYMs to the Crashlytics Dashboard
I think that your problem is related to two things:
As Gerrit said in the other answer crashes are sent to Crashlytics if the user opens the app again;
The crashes in Xcode --> Organizer are displayed only if the user sets on the share of analytics with App Developers.
For more informations take a look at this link: Share analytics, diagnostics, and usage information with Apple.
If people doesn't share the analytics you won't see any crash.
EDIT: I found that your problem may also be related to the debugger...for more information check this thread and see if you can find your solution here --> Crashlytics is not sending Crash report from iPhone.
I hope to have been helpful!
If the application is crashing before the like in your AppDelegate where you are setting up Fabric/Crashlytics then the crashes are not going to get sent through properly.
It may also be that the crashes you are experiencing are being filed as Out-of-memory crashes by Crashlytics.

Debugging native crashes in iOS in react-native

I am building an iOS app using react-native. I am distributing the app using TestFlight. Every once in a while, I would see a crash reported on TestFlight. When I look at the crash info in Xcode, it doesn't tell anything about what part of JS code may have caused the crash. Below is a sample crash log I get on Xcode. Here App refers to my app name.
Since these crashes occur only intermittently, and the above stack trace points to very generic methods, I am not sure how to go about debugging such crashes.
Please share what would be a good strategy to debug these crashes.

Crashlytics is not sending Crash report from iPhone

I've setup the Crashlytics in my one iOS application and installed the application on a real device. My Crashlytics Dashboard is displaying that, I've successfully added the app. However, it's not sending crash report. My internet speed is not so good. But I can check my emails from this device. Can anybody guess, where is the problem?
Xcode debugger does NOT allow Crashlytics to process crash reports. Yeah, that seem weird even to me when I read that first time but it is a fact (Source). That's is the reason we never see crash report When:
- running app in Simulator
- running app on iDevice by directly build and run from Xcode with debugger on.
To make sure a crash is reported during your testing (copied from Crashlytics support site):
1. Launch simulator
2. Press stop
3. Launch your app and force a crash
4. Relaunch the app from simulator
5. See the crash report in the web dashboard.
EDIT:
Added a reference; Crashlytics also provides a short article on a quick way to force a crash.
My be it's late but work 100%
Make some changes in project build settings like in below image
and follow these instructions.
The primary reason any crash reporter won't work on iOS is due to interference from different crash reporters. However, with Crashlytics specifically there could be something specific to them causing the crash report not getting reported.
Xcode debugger does NOT allow Any Crash Reporter to process crash reports. This is because XCode overrides any hooks into the crash handling call backs. This only happens when:
running app in Simulator (with debugger on)
running app on iDevice by directly build and run from Xcode with debugger on.
To make sure a crash is reported during your testing (http://support.crashlytics.com/knowledgebase/articles/92523-why-can-t-i-have-xcode-connected-):
Launch simulator
Press stop
Launch your app and force a crash
Relaunch the app from simulator
See the crash report in the web dashboard.
While a super old video it's still relevant, here's a video of the steps above (example from Crittercism): https://www.youtube.com/watch?v=sU6Su3PBFH4
For me, the problem was that the device was connected to my Mac :)
From this source:
Also, if you have your device connected to your Mac, XCode's debugger
will step in as well. So just disconnect the device before testing :)
I found solution using following steps
1. Go to Edit Scheme
2. Run -> Info
3. Change Build Configuration to release.
Now run the app crash it. You will receive mail.
We recently ran into this issue and I found that somewhere along the way the build script was removed. Adding it back in with the following fixed the issue for us:
./Crashlytics.framework/run <your_api_key> <build_secret>
Note : When using Cocoapods you will want to us the following instead of the above (source):
./Pods/CrashlyticsFramework/Crashlytics.framework/run
Adding a build script:
To add a Run Script Build Phase in Xcode 6, select your application target in your project, then select "Build Phases".
Click the small "plus" icon and select "New Run Script Build Phase".
You should now see a Run Script section in the middle of your Build Phase options, as shown above.
Inside the body of the Run Script Build Phase, paste in the script.`
The above quote comes from Crashlytics's visual tutorial, referenced in this post.
Note: I originally posted this answer verbatim for Crashlytics error code: 202 when Submitting files.
From the RayWenderlich site:
You won’t get any crash reports if Xcode intercepts the crash event!
To make all the examples below work, you have to build and run the
application, then click the stop button on Xcode. This way you will
have the latest version installed on the the device. Once that is
done, you can launch the app on the device itself, and then crash it
all you want! All the crashes on your iOS device will be caught and
sent to the server component of the service that you have integrated
into the app. Crash reports are usually sent to the server the next
time you start the app, so the steps to follow to generate a crash
report on the server are as follows: Build and run on Xcode. Press the
stop button. Run the app on your iOS device. Make the app crash. Run
the app again.
Crashlytics works for me until now.
I don't know why but now it doesn't work.
You should turn debug-mode on by
[Crashlytics sharedInstance].debugMode = YES;
My problem is here Crashlytics error code: 202 when Submitting files :(
Make sure you are not forcing the crash too early.
Set [Crashlytics sharedInstance].debugMode to YES;
Watch for
Crashlytics] Settings loaded
on the Xcode console logs.
Then force the crash and restart the app, and the crash will be reported now.
I ran into a similar problem when trying the test crash code.
Crashlytics.sharedInstance().crash()
I was running my app from a device, without Xcode, and the crash wouldn't show up on Crashlytics Dashboard. What worked for me was the following tip from Crashlytics website:
Make sure to launch the app after crashing it, so that the crash can
be uploaded
I commented out the above crash() call, and re-ran the app. Then the crash showed up in the Dashboard.
This is for xcode 9, from crashlytics 3.4.0
After doing this, be patient and wait for a few minutes.
Have you tried running [[Crashlytics sharedInstance] crash] on a device and seeing if that gets reported? There are a few reasons why Crashlytics might not work including other crash reporters etc.
If you don't upload the dSYM file, Crashlytics will not show your crash even though the report successfully uploaded.
You could run into this problem, if you have set up your build-script to only run on your CI server. Then if you have copied your app to your phone via xcode and you run it without being attached to the debugger, the report will be uploaded but ignored, because of the missing dSYM file.
Sometimes, it takes some time for the logs to show up. I am able to find them after 15-20 mins
One of the issue I feel that in the Run Script Phase, it should be a separate Run Script Phase for CrashLytics. When had the run script
./Fabric.framework/run
With some of my other script, everything was ok, CrashLytics log show report submitted, but nothing was in the web interface.
When I add another Run script phase only with Fabric run, it appears like a magic :)
My first try was with cocoapods, but that did not work.
When I manually add all the framework and a separate run script phase that worked.
This worked for me,
If you're testing on iDevice, just unplug iDevice with your Xcode and run your app.
Now, If crashed it will be updated on dashboard.
I solved by deselecting "Run Script only when installing" option in Run script (one for Fabric(crashlytics))

Resources