Skip to content

Assertion message when Sentry is loaded twice in app #4566

@philipphofmann

Description

@philipphofmann

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:.");

Metadata

Metadata

Assignees

Labels

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions