TestFlight crash log not showing in Xcode? - ios

Ok. I am on the latest version of Xcode, macOs, everything is updated. I just uploaded a new build to TestFlight and all of a sudden no crash reports are showing up in Organizer.
I know we had a crash because my tester showed me his phone - I had him go to Privacy settings and turn on the "share Analytics with developers" option, just as Apple says in their documentation.
This is what I see, despite multiple crashes from one of my testers and after waiting over 9 hrs for it too come through:
The odd thing is my last build generated full crash reports, which was great. I just retired that build, but the new build is not generating reports.
This is my scheme settings if that changes anything, I am new to test flight crash testing:
What am I doing wrong here?

I found that for me, the crash logs were not showing up in Xcode. However, if I completely exit Xcode and then re-open it the crash logs appeared. Not sure why this is. So to see my crash logs I had to:
Fully exit Xcode (Quit Xcode from the Xcode menu)
Reopen your project in Xcode
Go to Window > Organizer
Select the Crashes tab
You should now be able to select your appropriate build number from the drop down menu
Your crashes should now show up.
Keep in mind there may be a slight delay between when Apple receives it and when they show up in Xcode.

Related

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.

Why isn't Xcode crash report revealing the source code?

I've received my first crash report through TestFlight which I can see in the Organizer:
There are a couple of problems I'm having trying to debug the crash:
When I click the "Open in Project..." button, the project isn't automatically opened. Fine, but it's not even listed in the list of recent projects that's offered up to me as a next step (nothing is listed there, even though this is the only app I'm actively working on at the moment):
I click the "Browse..." button to open the .xcworkspace file for my project, but once the project opens, nothing useful happens. All I see is the Debug navigator opened with the crashed threads but nothing opens on the right side (editor):
Expanding the threads and clicking on the individual stack frames doesn't do anything.
The source code of the .xcworkspace file is the same code that was used to create the build that crashed. The app was archived and submitted to TestFlight with debug symbols and bitcode enabled. It's developed in Swift 2.2 with a few CocoaPods.
I've reviewed Apple's documentation on this (https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AnalyzingCrashReports/AnalyzingCrashReports.html) but I still can't figure out what I'm doing wrong.
What can I do to get Xcode to show me the source code that corresponds to this crash report?

Xcode crash Logs not appearing

I have an iOS app that is only crashing with the client on iOS8.0
At first I tried to install iOS simulator8.0 on my xcode7.0, OS X El Capitan to test the code but, facing some issues, I dropped the case
Now, what I am trying to do is get the crash log from xcode's organizer, but weird things are happening:
I am logged in xcode with my iTunes account
The app had the checkbox on for "Include app symbols for your application…" when uploading it to testflight, BUT the build details in iTunes Connect shows "Includes Symbols: NO"
The organizer does not show every versions of the app on iTunes Connect, although we can see all the versions and build numbers from my colleague's xcode.
Organizer doesn't show all the crash log of the app of the given build number although I can see some crashes on different builds (On the other hand, my colleague can not see any crash log happening on the app for the current version and for all the previous versions)
Can anyone help me on any (or both) of the issues? Thanks
NB: I want to avoid to ask the client to send me his device's crash logs. Although one time I asked a client for the crash log from the device and there wasn't any crash registered on the device
The reason you and your colleague do not see the same crash logs is likely
because your colleague is assigned a lesser role in your team.
(Say you are admin and he's technical)
Can't help with the Includes Symbols: NO issue cause I have
debug symbols stripping set to NO for both debug an release targets
and yet I see the exact same issue (Includes Symbols: NO in itc).
Apple just does not like to symbolicate I guess...

Forcing crash symbolication in crashes organizer and Xcode 7

Currently, my crash organizer looks as follows.
I have not really worked with crash logs before, but to me the crashes do not look symbolicated. I am unable to find where the app has crashed and for what reason. In addition, when I open the stack trace in the project, nothing is highlighted and I cannot tell and which line it crashed in the file. My question is: is there a way to symbolicate all these crashes from within the organizer, or must it be done through terminal?
Thanks.
What you're seeing is that the SDK classes like UITableView are symbolicated, but classes from your "YLSA" app are not. Both should be symbolicated automatically, but in my experience one or the other (or both) often do not symbolicate. I've been developing for iOS for five years and this has been a persistent problem through all the different Xcode versions.
I'm seeing the same problem as you in Xcode 7, but I was able to symbolicate my logs with this workaround:
In the list of crash logs, right-click the desired log and select Show in Finder. This will show you a package containing one or more .crash files and some metadata.
Navigate through the package until you find a crash log. You will see that the same info has or hasn't been symbolicated here.
In Xcode, open the Devices window and select a connected device, then click the View Device Logs button.
Drag the crash log in step 2 from the Finder into the list of logs for this device.
When I do this, I never see the log I added appear in the list, but if I click the headings once or twice to re-sort the list, then I see it.
After a moment, the crash log will become completely symbolicated.
If you already have a lot of logs in your list, you can compare the date, iOS version and hardware model as you view the log in the Finder to the logs in Xcode to make sure you're viewing the same log. Then look at the line that says "Triggered by Thread" to get the thread number that crashed, then scroll down to that thread to see the code that triggered the crash.
This worked for me today with Xcode 7. I hope it helps you!
When you submit apps through Xcode, an option will appear to include debug symbols. Next time you submit an app version, be sure to select that; if you did not, that might explain the problem you're seeing. Unfortunately there's no way to retroactively do that for app versions already submitted, so you'll have to wait until you're ready to submit the next version to see if that was the problem.

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