Firebase crash reporting for iOS doesn't send crashes despite successful init - ios

I added firebase crash reporting to my iOS project (added pod, added build phase script, added json to project, ...).
When i run my app, i see in my console:
Firebase Crash Reporting: Successfully enabled
For testing, i insert fatalError() in my code after my FIRApp.configure() code (as suggested here: https://firebase.google.com/docs/crash/ios#create_your_first_error).
No crash reports are sent at my next app launch (that doesn't crash). I see nothing in my xcode console and nothing in my web console.

Not an immediate solution, but some diagnostic tricks that may help locate the problem:
Make sure that the debugger is DISABLED when you generate the crash in the simulator or attached device, or the debugger will grab the crash before FCR does. Launch the app (⌘R) in Xcode, stop the debugger (⌘.) in Xcode, and re-launch the app manually in the simulator or on the device.
If you are using the simulator and you follow the above instructions, then you should see the raw crash dumps produced if you execute the command find ~/Library/Developer/CoreSimulator -path '*/FCRDumps/*.dmp' -ls (note that unprocessed crashes from other test apps will also be displayed).
If you see one or more dump files with the right timestamp, then you should get a successful upload the next time the app launches. Remove the fatalError() line, then rebuild and relaunch. The .dmp files in that container should soon disappear, replaced by .crash files (use find ~/Library/Developer/CoreSimulator -path '*/FCRCrashQueue/*.crash' -ls to find them). The crash files will be deleted one at a time after they successfully upload.

Related

FirebaseCrashlytics did not report crash to my firebase console dashboard

I was updating Fabric to new Firebase, my firebase showed old fabric crash report and no Firebase report. Now my firebaseCrashlytics version is 4.3.1. I had added GoogleService-Info.plist, script phase "${PODS_ROOT}/FirebaseCrashlytics/run" and phase's input files:${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME},
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH).
When I run my app, xcode console printed "[Firebase/Crashlytics] Version 4.3.1", no other log. I did not know what problem happened.
Few things you need to verify .
1- Is your crashlytics connected to your app.
Even though you initially connect your app in the setup phase to get the googleInfoPlist , you have to run it again and connect again .Select the crashlyitcs tab and you will get to click "Add SDK" which i think at this point you have completed .
After that run your app again and navigate through the app and at some point it will say that it is connected.
Another thing is you can force a crash but it wont appear in the crashlogs directly.
First you run it on the device and the stop running. Re-open the App and recreate the crash again. The Crash will not appear as long as the debugger is connected to your Emulator/Device

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.

Xcode cannot symbolicate my crash logs even though I have correct .dSYM file

I have been observing this that when ever my app crashes i get the crash log and try to symbolicate it but following happen
When I use xcode to symbolicate, it never symbolicates the addresses of the crash
When I use atos command specified developer.apple.com technotes it either gives some other class function name that does not have to do any thing with the crash
I have used other methods like symbolicatecrash script but the result is same as before.
I also tried solution given stackoverflow.com/questions/7932992 but did not succeed
I created a demo crash and tried to change my scheme of the app for "Run" and changed "build configuration" to "release" to check if the crashes symbolicate when I run the app directly to device, I test the app, the demo crash occurs and in this case the crahes get symbolicated.
I created a demo crash in a new app and created an archive and export IPA, used this ipa in a device to recreate that crash but still xcode could not symbolicate that crash.
I don't get why is it behaving this way,
I looked into the archives to find my dSYM file and can locate it there but could not symbolicate it using any of the processes stated above.
A guidance will be helpful!
I was working with code back to see if there can be any impact of bitcode with help of a friend, found that while exporting archive to IPA, it asks me to rebuild with bitcode (which was checked) I just tried and unchecked it to create the IPA and this time my app crash logs were symbolicated, I still don't know why this happens because apple recomends to rebuild with bitcode while submitting apps.
I am looking for more answeres for why is it happening?
Will keep you posted (also a enlighten me if there are any misses.)

iOS Crash report is unsymbolicated

Although, I have run the script to upload .dsym file, it shows this error: "This stack trace is unsymbolicated. To obtain symbols, you need to upload your dSYM file via the command line tool."
Also, even if I force a crash using the method provided, it does not show up under analytics. I am on ParseCrashReporting 1.9.2.
It used to work reliably earlier, about 3-4 months back. Not any more.

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