-
-
Notifications
You must be signed in to change notification settings - Fork 366
Description
Platform
iOS
Environment
Production
Installed
Manually
Version
8.56.2
Xcode Version
16.4
Did it work on previous versions?
No response
Steps to Reproduce
Start SDK with options.attachViewHierarchy = true
and force a fatal crash.
Expected Result
It would be ideal if we could still attach the viewhierarchy to the error that happens. However, I understand that that might not be technically possible (and I see that this feature is noted as both "experimental" and "best effort" in the source documentation). But if we can't successfully attach a viewhierarchy file to the error event (or if the file is essentially empty json), I think that we shouldn't attach anything at all instead of just attaching the empty file. When I loaded the event in the console after the fatal crash, I had to spend time tracking down why it looks like I had a view hierarchy, but it was empty.
Alternatively/additionally, it might be helpful to add another comment to the source documentation that mentions that this probably won't work for fatal crashes.
Note: I also filed an issue for this on the getsentry/sentry repo here getsentry/sentry#101356 as I was thinking both the console and the sdk could handle things in a (separate?) way that made this clearer.
Actual Result
Here's the result in the console of forcing a fatal crash with this setting turned on:

Are you willing to submit a PR?
No response