bitstadium / HockeySDK-iOS

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.
https://github.com/microsoft/appcenter-sdk-apple
Other
597 stars 268 forks source link

BITCrashManager cancelled #529

Closed staffler-xyz closed 6 years ago

staffler-xyz commented 6 years ago

Hello!

We have a strange problem where crashes are not showing up from recent versions in the web interface. This is the device log (HockeySDK 5.1.2, iOS 12, shortened):

[HockeySDK] -[BITCrashManager sendNextCrashReport]/1543 INFO: Sending crash reports:
[C17 sdk.hockeyapp.net:443 tcp, url: https://sdk.hockeyapp.net/api/2/apps/<id>/crashes, tls] start
[HockeySDK] -[BITCrashManager sendCrashReportWithFilename:xml:attachment:]/1703 INFO: Sending crash reports started.
[C17 sdk.hockeyapp.net:443 tcp, url: https://sdk.hockeyapp.net/api/2/apps/<id>/crashes, tls] cancel
[C17 sdk.hockeyapp.net:443 tcp, url: https://sdk.hockeyapp.net/api/2/apps/<id>/crashes, tls] cancelled
[HockeySDK] -[BITCrashManager processUploadResultWithFilename:responseData:statusCode:error:]_block_invoke/1632 INFO: Received API response: {
    delay = 6000;
    id = 20513384909;
    status = "-80";
}

It seems like the request started sending, but got cancelled. Could this be an issue of the host? Or is the library cancelling the request?

bmourat commented 6 years ago

Hi, @overovermind, These lines have nothing to do with the result of uploading the crash report. You can see it is just INFO level logging, not the ERROR. I'm getting the same lines but my crashes appear on the portal. So, i think there must be another reason for absent crashes. Could you please provide following info:

  1. The device model you are testing on
  2. Does this happen only for iOS 12 devices?
  3. Are all of your crashes missing or some of them appear on the portal?
  4. I suppose your app logs these lines. At what moment are you doing the logging?
    [C17 sdk.hockeyapp.net:443 tcp, url: https://sdk.hockeyapp.net/api/2/apps/<id>/crashes, tls] cancel
    [C17 sdk.hockeyapp.net:443 tcp, url: https://sdk.hockeyapp.net/api/2/apps/<id>/crashes, tls] cancelled
staffler-xyz commented 6 years ago

Hi!

Thanks for your response.

1) iPhone XS 2) For any device and iOS version. 3) All of them are missing. 4) I took the logging directly from the device to see if something went wrong.

We also checked that there isn't another framework that is catching crashes...but as it seems, the crashes is sent, so this should be ok.

I also check the troubleshooting points (https://www.hockeyapp.net/help/sdk/ios/3.6.2/docs/docs/Troubleshooting-Crash-Reporting-Not-Working.html).

Could there be any reason the backend is not accepting the crash log?

[update] Just noticed that the hockey ID was of type store. Created a new property with type beta and the crashes got reported there! Can store IDs only be used for app store releases?

lumaxis commented 6 years ago

@staffler-xyz The id = 20513384909; part from your API response is the actual Crash ID in our database. I just took a look at the data and the issue is that you are re-using build numbers (CFBundleVersion). HockeyApp has always and still does rely on the build number being unique.

We're aware that Apple for a few years now allows re-using build numbers for new versions but unfortunately, to not break consistency with other platforms and backwards compatibility for existing customers, we can't easily adapt HockeyApp to that behavior. Therefore, I'd ask you to start using unique build numbers for every version and then the crashes will end up in the correct app versions on HockeyApp too.

For the crashes from this current version, you should be able to find all of them at https://rink.hockeyapp.net/manage/apps/693285/app_versions/24/crash_reasons . Hope this helps!