fix(ios): honor _experiments.enableUnhandledCPPExceptionsV2 on v8#6014
Open
antonis wants to merge 3 commits intoantonis/fix-ios-ui-profiling-optionsfrom
Open
fix(ios): honor _experiments.enableUnhandledCPPExceptionsV2 on v8#6014antonis wants to merge 3 commits intoantonis/fix-ios-ui-profiling-optionsfrom
antonis wants to merge 3 commits intoantonis/fix-ios-ui-profiling-optionsfrom
Conversation
Same dead-code issue as the profiling fix — `SentrySDKWrapper` parses `_experiments.enableUnhandledCPPExceptionsV2`, but `RNSentryStart` (the live init path since v8.0.0) does not. Port the handling into the `_experiments` block just introduced for `profilingOptions`, and add enabled/disabled/default XCTest coverage on `RNSentryStart`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
…ios-cpp-exceptions-v2 # Conflicts: # CHANGELOG.md
7 tasks
…ios-cpp-exceptions-v2
This was referenced Apr 17, 2026
📲 Install BuildsAndroid
|
Contributor
iOS (legacy) Performance metrics 🚀
|
Contributor
iOS (new) Performance metrics 🚀
|
alwx
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Stacked on #6012. Review/merge that one first; once it lands, rebase this onto
main.📢 Type of change
📜 Description
Same dead-code drift as the profiling fix in #6012.
SentrySDKWrapper.createOptionsWithDictionaryparses_experiments.enableUnhandledCPPExceptionsV2intosentryOptions.experimental.enableUnhandledCPPExceptionsV2(ios/SentrySDKWrapper.m:105-108), butSentrySDKWrapperhas not been on the live init path since #5582 moved init toRNSentryStart. So on iOS this option has been silently ignored in every 8.x release — userSentry.init({ _experiments: { enableUnhandledCPPExceptionsV2: true } })does not reach Cocoa.(Verified Cocoa's
SentryOptionsInternal.mdoes not auto-map_experiments.*from the raw dictionary — only top-level keys likeenableLogs. So the gap is real.)This PR extends the
_experimentsblock introduced in #6012 to also portenableUnhandledCPPExceptionsV2handling. Adds enabled / disabled / default XCTest coverage onRNSentryStart, mirroring the coverageSentrySDKWrapperalready had but on the live path.💡 Motivation and Context
User-facing: with
enableUnhandledCPPExceptionsV2: trueset in JS, iOS still falls back to the default handler, so C++ crashes don't get the more reliable__cxa_throwhooking. Same class of silent drop as the profiling regression — same fix pattern.💚 How did you test it?
RNSentryStart:testStartCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Enabled→ assertsactualOptions.experimental.enableUnhandledCPPExceptionsV2 == YES…Disabled→ asserts== NO…Default(no_experimentskey) → asserts== NOyarn build,yarn circularDepCheck,./scripts/clang-format.sh lintall clean.📝 Checklist
sendDefaultPIIis enabled🔮 Next steps