Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion message when Sentry is loaded twice in app #4566

Open
philipphofmann opened this issue Nov 22, 2024 · 0 comments
Open

Assertion message when Sentry is loaded twice in app #4566

philipphofmann opened this issue Nov 22, 2024 · 0 comments

Comments

@philipphofmann
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Discussion
Development

No branches or pull requests

1 participant