sentry-cocoa: Crash reports not generated on watchOS

Platform:

  • iOS
  • tvOS
  • MacOS
  • [x ] watchOS

Swift:

  • [x 5.1] Yes -> If yes, which version?
  • No

sentry-cocoa installed with:

  • CocoaPods
  • [x ] Carthage
  • Manually

Version of sentry-cocoa: 4.5.0


I have following issue: I have sentry installed in the watchkitextension and enabled. When I trigger a crash with Client.shared?.crash() it crashes but isn’t generating a report. I am monitoring the files via the simulator. I am running in the simulator but without the debugger attached and looking at the process logs through Console.

2020-03-12 14:53:07.317602-0500 WatchCrashlytics WatchKit Extension[10206:10166742] Sentry - Debug:: SentryCrashHandler started
2020-03-12 14:53:07.323403-0500 WatchCrashlytics WatchKit Extension[10206:10166742] Sentry - Debug:: Sent 0 crash report(s)```

**Steps to reproduce:**
- I created a new watchkit + iphone app in Xcode. I then followed https://sentry.io/under-armour-l7/under-armour-l7/getting-started/cocoa-swift/.

**Actual result:**
- No crash reports are generated

**Expected result:**
- Crash reports should be generated

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 10
  • Comments: 41 (24 by maintainers)

Most upvoted comments

We can’t do anything about this until Apple enables signal handling, and Mach exception support for WatchOS.

f you want this, you need to go to Apple developer forum and let them know you would like Mach exception support and Signal handling support for WatchOS.

we don’t see many people asking for it

I’m just chiming in to ask for watchOS support! Thank you!

I would encourage everyone to use Feedback Assistant to request these missing APIs required for 3rd party crash reporting on watchOS from Apple.

That being said getting reporting for unhandled exceptions would be a partial win for us.

Thanks for pointing that out, @EmDee. I raised an issue (https://github.com/getsentry/static-sites/issues/779) to fix this for our marketing https://sentry.io/for/watchos/. The repository for static sites is internal, though.

I also opened up a PR for the docs to remove the section on crash handling to avoid confusion https://github.com/getsentry/sentry-docs/pull/4448.

@philipphofmann If asking is giving this a bit higher priority, then I’m asking as well.

The docs are extremely confusing, as they seem to be auto-generated for all OS’, e.g. https://docs.sentry.io/platforms/apple/guides/watchos/ has two small hints that crash handling is not supported, but then there is this big Crash handling section in here. Same goes for the marketing in https://sentry.io/for/watchos.

You should definitely communicate this more clearly.

Sorry about the confusion @triplef; I opened up a PR to fix this on the docs: https://github.com/getsentry/sentry-docs/pull/4175.

@mu99el thanks for reporting this. I can reproduce the issue. We are trying to fix this, but I can’t give you an ETA at the moment.

So, this is something that we researched at Crashlytics while I was there, soon after the original announcement and release of watchOS. Unfortunately, some of the fundamental APIs needed to record mach exceptions and signals are explicitly disallowed in watchOS. See:

This basically precludes any notification of a crash having occurred, or being able to capture sensical results at such a time.

It appears Crashlytics actually went ahead anyways and tried adding watchOS crash reporting (as mentioned by @philipphofmann upthread) a couple months after this issue was opened, without success.

Any update on this? We’re evaluating to migrate from Crashlytics to Sentry and also assumed that watchOS is fully supported.

Is there any ETA on when Sentry SDK for watchOS would handle and report crashes? We are using Sentry in our technology stack, but if it still doesn’t support handling crashes we would need to use another service in our watchOS app 😦 Thanks!

You may want to update your watchOS marketing page if this is still unavailable. I signed up thinking crash reporting was available until I found in the documentation that it wasn’t in reality.

@HazAT How can I help to debug this? Running Sentry 5.1.8 on watchOS 6.2.8. Events reported with SentrySDK.capture(message: "Hello") arrive, but SentrySDK.crash() does not. I’m testing on device, not attached to the debugger.