Description
We fixed loading Sentry integration from the same binary with #4541, but when Sentry is loaded twice it still could happen that Sentry isn't working correctly. It would be great to detect this in the SDK, and consider logging an error or doing an assert to crash the app in debug. We had a customer who didn't realize they loaded Sentry twice, and it they didn't receive any crash reports cause the client was nil in the SentryCrashReportSink
|
SENTRY_LOG_ERROR( |
|
@"Crash reports were found but no [SentrySDK.currentHub getClient] is set. " |
|
@"Cannot send crash reports to Sentry. This is probably a misconfiguration, " |
|
@"make sure you set the client with [SentrySDK.currentHub bindClient] before " |
|
@"calling startCrashHandlerWithError:."); |
Description
We fixed loading Sentry integration from the same binary with #4541, but when Sentry is loaded twice it still could happen that Sentry isn't working correctly. It would be great to detect this in the SDK, and consider logging an error or doing an assert to crash the app in debug. We had a customer who didn't realize they loaded Sentry twice, and it they didn't receive any crash reports cause the client was nil in the
SentryCrashReportSinksentry-cocoa/Sources/Sentry/SentryCrashReportSink.m
Lines 78 to 82 in 166d67a