Skip to content

fix(ios): Register replay mask classes when sample rates are 0 - #7008

Merged
alwx merged 2 commits into
mainfrom
alwx/bugfix/6996
Nov 10, 2026
Merged

alwx merged 2 commits into
mainfrom
alwx/bugfix/6996

Conversation

@alwx

@alwx alwx commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix

📜 Description

RNSentryStart now calls [RNSentryReplay postInit] whenever session replay is supported, not only when a replay sample rate is above 0. postInit starts no recording. It only registers the Mask and Unmask container classes and the RN breadcrumb converter on the installed replay integration.

💡 Motivation and Context

Since 8.27 you can start a replay manually with both sample rates at 0, and sentry-cocoa always installs the replay integration. On iOS such a replay had no RN container classes, so Sentry.Unmask and Sentry.Mask had no effect. Fixes #6996.

💚 How did you test it?

A new OCMock test starts the SDK with both rates at 0 and checks that postInit runs. It fails with the old condition and passes with the fix. The full RNSentryCocoaTester suite passes on an iOS simulator (208 tests).

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • All tests passing.
  • No breaking changes.

alwx added a commit that referenced this pull request Nov 10, 2026
Replace the PR number placeholder in the changelog entry with #7008.
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • fix(ios): Register replay mask classes when sample rates are 0 by alwx in #7008
  • feat(ios): Forward experimental enableWatchdogTerminationsV2 to sentry-cocoa by alwx in #7012
  • docs: Update Warden skills mentioned in the review skill by antonis and claude in #7004
  • ci: Skip CI for warden.toml-only changes by antonis and claude in #7005
  • build(deps): Bump joi to 17.13.9 to resolve ReDoS advisory by antonis and claude in #7003
  • chore(deps): bump getsentry/craft from 3.9.0 to 3.11.1 by dependabot in #7001
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 3.9.0 to 3.11.1 by dependabot in #6999
  • chore(deps): bump actions/setup-java from 6.1.0 to 6.2.0 by dependabot in #7002
  • chore(deps): bump ruby/setup-ruby from 1.336.0 to 1.338.0 by dependabot in #7000
  • chore(deps): bump the codeql-action group with 3 updates by dependabot in #6998
  • chore(warden): Remove find-bugs, already covered by code-review by dcramer with sentry-junior in #6997
  • chore(deps): update Sentry Android Gradle Plugin to v6.26.0 by github-actions in #6995
  • chore(warden): Enable incremental review by Jeffreyhung with sentry-junior in #6994
  • chore(deps): update Android SDK to v8.63.0 by github-actions in #6990

🤖 This preview updates automatically when you update the PR.

@alwx
alwx marked this pull request as ready for review November 10, 2026 10:46
@alwx
alwx requested review from a team and lucas-zimerman as code owners November 10, 2026 10:46
@alwx
alwx requested review from antonis and buenaflor and removed request for a team November 10, 2026 10:46

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eda6aa0. Configure here.

Comment thread packages/core/ios/RNSentryStart.m Resolved
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Nov 10, 2026

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the CI is 🟢

@sentry

sentry Bot commented Nov 10, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.34.0 (114) Release

⚙️ sentry-react-native Build Distribution Settings

alwx added 2 commits November 10, 2026 17:08
RNSentryStart ran RNSentryReplay postInit only when a replay sample rate was above 0. Since 8.27 you can start a replay manually with both rates at 0, and sentry-cocoa always installs the replay integration. Such a replay recorded without the RN mask and unmask container classes and without the RN breadcrumb converter, so Sentry.Unmask and Sentry.Mask had no effect.

postInit now runs whenever replay is supported. It starts no recording. It only configures the installed integration, and the cocoa calls do nothing when the integration is missing.

A new OCMock test starts the SDK with both rates at 0 and checks that postInit runs. It fails with the old condition.

Fixes #6996
Replace the PR number placeholder in the changelog entry with #7008.
@alwx
alwx enabled auto-merge (squash) November 10, 2026 16:10
@alwx
alwx merged commit 82cbc7f into main Nov 10, 2026
49 of 76 checks passed
@alwx
alwx deleted the alwx/bugfix/6996 branch November 10, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS: Sentry.Unmask / Sentry.Mask ignored when replay is started manually with both sample rates at 0

2 participants