sentry-cocoa: NSException does not include reason
Platform
macOS
Installed
Swift Package Manager
Version
8.9.4
Steps to Reproduce
Call some Apple API which throws an NSException.
Expected Result
I expected the crash report to help me solve the crash, but without a .reason description, it’s hard to pin-point the issue.
Actual Result
The report only includes a stack trace, but without the exception reason, it’s hard to fix the issue.
All it says is:
NSException > terminating due to uncaught exception of type NSException
Example report: https://sindresorhus.sentry.io/issues/4439865559/events/ec44fb881aa542548650394ce017d6c6/
The stack trace in the above report points to this line: https://github.com/sindresorhus/Actions/blob/e2d1b2ffecb185df81311609d7b0f4cd29f57cf5/Shared/Actions/ParseCSV.swift#L102-L105
This is a big problem, because pretty much all crashes I get are NSException from Apple’s frameworks. All my apps are using safe Swift, so they don’t generally crash in the app code.
Are you willing to submit a PR?
No
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 19 (7 by maintainers)
Commits related to this issue
- fix: Write NSException reason for crash report Correctly write the NSException reason when writing a crash report. When writing a crash report for NSException the crash report writer wrote the crash ... — committed to getsentry/sentry-cocoa by philipphofmann 4 months ago
- fix: Write NSException reason for crash report (#3705) Correctly write the NSException reason when writing a crash report. When writing a crash report for NSException the crash report writer wrote t... — committed to getsentry/sentry-cocoa by philipphofmann 4 months ago
Still happening: https://sindresorhus.sentry.io/issues/4525304601/events/d11ffdd9fbef4ae9a80e744d6046cf73/
Another one:
https://sindresorhus.sentry.io/issues/4525409382/events/eeadeaca905e4e17abaa6e1718f3c855/
@philipphofmann I think this was accidentally closed.
I cannot reproduce either, so I guess it was fixed in Sentry Cocoa since v8.9.4 (the version of the exmaple report in the issue).