Crashlytics is not sending Crash report from iPhon

2019-01-08 21:26发布

问题:

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?

回答1:

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 and an article on why you don't see the data from your first crash.



回答2:

My be it's late but work 100%

Make some changes in project build settings like in below image

and follow these instructions.



回答3:

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-):

  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.

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



回答4:

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 :)



回答5:

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:

  1. To add a Run Script Build Phase in Xcode 6, select your application target in your project, then select "Build Phases".
  2. Click the small "plus" icon and select "New Run Script Build Phase".
  3. You should now see a Run Script section in the middle of your Build Phase options, as shown above.
  4. 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.



回答6:

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.



回答7:

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.



回答8:

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.



回答9:

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.



回答10:

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 :(



回答11:

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.



回答12:

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.



回答13:

Sometimes, it takes some time for the logs to show up. I am able to find them after 15-20 mins



回答14:

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.



回答15:

This is for xcode 9, from crashlytics 3.4.0

After doing this, be patient and wait for a few minutes.



回答16:

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.



回答17:

I solved by deselecting "Run Script only when installing" option in Run script (one for Fabric(crashlytics))