-
-
Notifications
You must be signed in to change notification settings - Fork 356
fix(e2e): Fix captureReplay e2e failure on iOS #5500
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
Draft
antonis
wants to merge
12
commits into
capture-app-start-errors-v7
Choose a base branch
from
antonis/e2e-ios-captureReplay
base: capture-app-start-errors-v7
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
fix(e2e): Fix captureReplay e2e failure on iOS #5500
antonis
wants to merge
12
commits into
capture-app-start-errors-v7
from
antonis/e2e-ios-captureReplay
Conversation
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
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 60d1e83+dirty | 1201.87 ms | 1204.61 ms | 2.74 ms |
| 99179a4+dirty | 1210.16 ms | 1213.57 ms | 3.40 ms |
| f26d7a8+dirty | 1227.33 ms | 1220.67 ms | -6.66 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 60d1e83+dirty | 3.41 MiB | 4.67 MiB | 1.26 MiB |
| 99179a4+dirty | 3.44 MiB | 4.67 MiB | 1.23 MiB |
| f26d7a8+dirty | 3.44 MiB | 4.67 MiB | 1.23 MiB |
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 60d1e83+dirty | 1207.79 ms | 1207.35 ms | -0.44 ms |
| 99179a4+dirty | 1213.96 ms | 1215.34 ms | 1.38 ms |
| f26d7a8+dirty | 1209.49 ms | 1207.54 ms | -1.95 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 60d1e83+dirty | 3.41 MiB | 4.67 MiB | 1.26 MiB |
| 99179a4+dirty | 3.44 MiB | 4.67 MiB | 1.23 MiB |
| f26d7a8+dirty | 3.44 MiB | 4.67 MiB | 1.23 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f26d7a8+dirty | 380.15 ms | 407.84 ms | 27.68 ms |
| 99179a4+dirty | 357.38 ms | 375.64 ms | 18.26 ms |
| 60d1e83+dirty | 406.16 ms | 422.83 ms | 16.67 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f26d7a8+dirty | 43.94 MiB | 48.90 MiB | 4.96 MiB |
| 99179a4+dirty | 43.94 MiB | 48.90 MiB | 4.96 MiB |
| 60d1e83+dirty | 43.94 MiB | 48.90 MiB | 4.96 MiB |
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f26d7a8+dirty | 571.36 ms | 637.92 ms | 66.56 ms |
| 99179a4+dirty | 405.13 ms | 415.16 ms | 10.03 ms |
| 60d1e83+dirty | 396.72 ms | 390.04 ms | -6.68 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f26d7a8+dirty | 43.75 MiB | 48.08 MiB | 4.32 MiB |
| 99179a4+dirty | 43.75 MiB | 48.08 MiB | 4.32 MiB |
| 60d1e83+dirty | 43.75 MiB | 48.08 MiB | 4.32 MiB |
… new replay options The patch script now detects and updates apps that were patched with the old _experiments.replaysOnErrorSampleRate format and replaces them with the new top-level replaysOnErrorSampleRate and replaysSessionSampleRate options. This fixes the captureReplay E2E test failure where replay_id was null because the old patch format was not compatible with the current SDK.
Manually specifying integrations array replaces ALL default integrations, which breaks the SDK. The SDK automatically adds mobileReplayIntegration() when replay sample rates are set, so we don't need to add it manually. This should fix replay_id being null in events.
Use _experiments.replaysOnErrorSampleRate and manually add mobileReplayIntegration() to match main's working configuration.
The feature branch adds __SENTRY_OPTIONS__ support which defaults autoInitializeNativeSdk to false when options come from a file. This breaks replay since the native SDK (which handles replay recording) doesn't initialize. Explicitly setting autoInitializeNativeSdk: true ensures the native SDK always initializes in E2E tests, allowing replay to work properly.
The re-patching logic for old _experiments format is not needed since both main and this branch use the same format. Keep only the essential fix: autoInitializeNativeSdk: true
The feature branch adds __SENTRY_OPTIONS__ support which defaults autoInitializeNativeSdk to false when options come from a file and autoInitializeNativeSdk is not explicitly set. The sample app has sentry.options.json which gets loaded via withSentryConfig() in metro.config.js. This caused the SDK to skip native initialization, breaking replay in E2E tests. Adding autoInitializeNativeSdk: true to sentry.options.json ensures native SDK initializes correctly.
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.
📢 Type of change
📜 Description
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps
#skip-changelog