sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

Crash reports not generated on watchOS

Open jostster opened this issue 4 years ago • 36 comments

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

jostster avatar Mar 12 '20 20:03 jostster

I have also tried this on 5.0.0-alpha.4 as well and it does not seem to run the [SentryCrash install]. Adding breakpoints it shows it runs through [SentryCrashInstallation install] but never actually goes into any of those methods, just seems to roll over them.

jostster avatar Mar 13 '20 15:03 jostster

@jostster Can you share your example app with Sentry installed so we can reproduce this? Thanks

HazAT avatar Mar 16 '20 09:03 HazAT

@HazAT is there an email address I can send it to?

jostster avatar Mar 16 '20 15:03 jostster

My firstname @ sentry.io

HazAT avatar Mar 25 '20 19:03 HazAT

Any new updates on this @HazAT or @jostster? Can you try it with version 5.x.x and let us know if you still have the issue present?

philipphofmann avatar Jun 15 '20 14:06 philipphofmann

@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.

st3fan avatar Jul 07 '20 00:07 st3fan

Hey all, any updates on this issue? Have the same issues like @st3fan : SentrySDK.capture(message: "Hello") works, but SentrySDK.crash() not. Tested with different Watch Models and Simulator.

mu99el avatar Jul 13 '20 11:07 mu99el

Thanks, @st3fan and @mu99el for reaching out to us about this issue. We are going to take a look soon and come back to you.

philipphofmann avatar Jul 14 '20 08:07 philipphofmann

@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.

philipphofmann avatar Jul 22 '20 09:07 philipphofmann

We update the Readme https://github.com/getsentry/sentry-cocoa/pull/632 and our official docs for https://github.com/getsentry/sentry-docs/pull/1924 to have clear expectations for all devs at the moment.

philipphofmann avatar Jul 23 '20 12:07 philipphofmann

Any progress on this? It feels like one is left quite alone when developing watchOS apps... :)

LiMuBei avatar Oct 14 '20 19:10 LiMuBei

Sorry @LiMuBei no progress update on this one. Maybe we can learn from this issue https://github.com/firebase/firebase-ios-sdk/issues/4558 and this PR https://github.com/firebase/firebase-ios-sdk/pull/6262.

philipphofmann avatar Oct 15 '20 05:10 philipphofmann

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.

aaronpearce avatar Apr 14 '21 01:04 aaronpearce

@aaronpearce Apologies for the confusion. We'll update the marketing pages to clarify the state of the support.

bruno-garcia avatar Apr 14 '21 16:04 bruno-garcia

We’re running into the same issue after following your documentation to integrate Sentry v7.2.8 into our watchOS app. Very misleading.

Is there a timeline when this is expected to be resolved?

triplef avatar Sep 15 '21 13:09 triplef

This was a regression to the docs (making content reusable between "Apple platforms") and again showed the crash bits for watchOS. Sorry once again for the confusion

bruno-garcia avatar Sep 15 '21 14:09 bruno-garcia

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

philipphofmann avatar Sep 22 '21 07:09 philipphofmann

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Nov 08 '21 09:11 github-actions[bot]

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!

albertinad avatar Nov 09 '21 14:11 albertinad

Sorry to hear that @albertinad. I can't give you an ETA at the moment. You asking for this definitely gives this a bit of a higher priority.

philipphofmann avatar Nov 10 '21 13:11 philipphofmann

@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.

EmDee avatar Nov 30 '21 08:11 EmDee

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 avatar Nov 30 '21 10:11 philipphofmann

Have a look at KSCrash. Maybe they already added it.

philipphofmann avatar Dec 29 '21 14:12 philipphofmann

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

weakfl avatar Jan 27 '22 11:01 weakfl

Sorry, we don't have an update on this as not many people ask for this. I'm happy to hear that you are evaluating moving to Sentry @weakfl. Is this a blocker for you?

philipphofmann avatar Jan 27 '22 18:01 philipphofmann

not many people ask for this.

That kind of surprises me considering the ever increasing number of watchOS users.

Is this a blocker for you?

Well, kind of @philipphofmann. But given the lack of alternatives besides Crashlytics we'll probably have to make do. I hope you'll consider adding supporting for watchOS crashes nonetheless.

weakfl avatar Jan 28 '22 08:01 weakfl

Of course, we consider adding support for watchOS crashes at some point, but right now, we don't see many people asking for it, which is why it has a lower priority. We are always happy to accept PRs if you are up for it.

philipphofmann avatar Jan 28 '22 10:01 philipphofmann

Just been going through the code a little to understand what it would take to implement this, but it's quite a large codebase to digest :) I've found an interesting comment though: https://github.com/getsentry/sentry-cocoa/blob/e47eea57ef97e9b1a949a230b74219587619c33f/Sources/SentryCrash/Recording/SentryCrashSystemCapabilities.h#L130 And it seems due to this watchOS is excluded in the following define which seems to disable the crash reporting functionality. The respective commit for this is apparently 4 years old. Maybe this is not true anymore? I'm also wondering what this refers to? watchOS version 3.1?

LiMuBei avatar Feb 04 '22 10:02 LiMuBei

@LiMuBei, that's exactly the problem. You can enable it back, at least for the last WatchOS version, looks like it is working based on some tests I've done. But we need to investigate it further to determine since which version it is ok to enable it, and if there is no other issue related to it, before we fix this in the SDK

brustolin avatar Feb 07 '22 09:02 brustolin

we don't see many people asking for it

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

trevorturk avatar Feb 11 '22 17:02 trevorturk