Black session replays on iOS
What React Native libraries do you use?
React Navigation, Hermes, Expo Application Services (EAS), Expo (mobile only)
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.19.0
How does your development environment look like?
System:
OS: macOS 14.7.1
CPU: (14) arm64 Apple M3 Max
Memory: 1.57 GB / 36.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.17.1
path: ~/.nvm/versions/node/v22.17.1/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.9.2
path: ~/.nvm/versions/node/v22.17.1/bin/npm
Watchman:
version: 2025.03.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2411.12071903
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.12
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.2
wanted: 0.74.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: fals
Sentry.init()
Sentry.init({
dsn: 'https://[email protected]/...'
// other options
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
replaysSessionSampleRate: 1.0,
integrations: [
reactNativeTracingIntegration(),
mobileReplayIntegration({
maskAllText: false,
maskAllImages: false,
maskAllVectors: false,
enableViewRendererV2: true,
enableFastViewRendering: true,
}),
hermesProfilingIntegration(),
navigationIntegration,
],
enableAutoPerformanceTracing: true,
attachViewHierarchy: true,
attachScreenshot: true,
enableAppStartTracking: true,
enableNativeFramesTracking: true,
enableStallTracking: true,
enableUserInteractionTracing: true,
enabled: !__DEV__,
ignoreErrors: [/Amplitude Logger/i],
});
Steps to Reproduce
Nothing much to reproduce it, just open the app and once you get replay on sentry dashboard they are all black for iOS
Expected Result
an actual video of session replay on sentry dashboard
Actual Result
Hey @aminerol - a few questions: does it work on Android? Did you try and reproduce this on simulator and on real device?
Also can you try again after turning enableFastViewRendering off? This is a slightly more aggressive mode that may impact Replays and may be removed in the future.
Hey @kahest, this works just fine on android, and this was tested on real device with production bundle using testflight.
and yes the black replays starts happening only after enabling enableFastViewRendering to help with frame drops cause in our case all list stutters when scrolling if session replay is on
There's two settings related to Session Replay render performance on iOS:
enableViewRendererV2which is active by default since RN SDK 6.14.0 and usually has a much bigger (positive) perf impact and no known drawbacksenableFastViewRenderingwhich is deactivated by default, has a smaller perf impact and known issues (like the one you experience) - this is also why we don't mention this setting in our onboarding docs
So in case you didn't test your app with just the first setting active, I think it'd be worth it. The second option is really a fall back that can work nicely for some apps, but might not work at all for others.
Thanks for clarifying the differences between the two settings.
We initially enabled enableViewRendererV2, but unfortunately it didn’t resolve the frame drops we were seeing especially the visible jumps during scrolling. That’s why we ended up turning on enableFastViewRendering, which did help with the scrolling issue, but as you mentioned, it comes with drawbacks on iOS Session Replay.
Right now we’re stuck between two trade-offs:
Keep enableFastViewRendering off → smoother scrolling but no usable Session Replay on iOS.
Keep it on → sacrifice scrolling smoothness for the sake of having Session Replay.
Given this situation, are there any workarounds or upcoming improvements planned that could help us achieve both smooth scrolling and reliable Session Replay on iOS?
Is there any chance you could provide a minimal reproducer? This would really help us find out what's causing the slowdown and give us a chance to provide a fix or workaround
yes fore sure, ill get back to you when the reproducer is ready, thanks a bunch
Hey @kahest, this is a minimal reproducer for black session replays on iOS https://github.com/aminerol/black-session-replays-ios. let me know if can help with anything else
Thanks @aminerol for the repro. I'll take a look and get back to you.
hey @philprime @kahest , just checking in any updates on this one?
Hey @aminerol, unfortunately not yet. We've been busy in getting ready for releasing an SDK update for the new OS 26 platforms. This task is still on my todo list.
Thanks for the update @philprime 🙏 No worries. Just to flag, I also noticed that all session replays are now showing the label UIViewController instead of the actual screen name maybe this is a clue that session replay is failing early in the process
Thanks again for providing the sample, I got it working on my machine and here are the results:
-
As expected when enabling
enableFastViewRenderingthe captured screens is black/corrupted. -
When disabling the
enableFastViewRenderingit is drawn correctly:
- The reason you are seeing
UIViewControllerin the top is because it displays the current view controller and the sample only uses one.
We are aware of performance issues and will further investigate them in https://github.com/getsentry/sentry-cocoa/issues/5155. In case you can provide us with a repro where the impact is noticable and reproducible, we would highly appreciate it.
Other than that I can only recommend you to not use enableFastViewRendering
Closing this because it's not actionable right now. Feel free to comment if you have additional insights.
I’ve set up a small sample app in a private GitHub repo that reproduces the scrolling lag and frame drops when Session Replay is enabled. The issue appears on the production build, though we’ll need to confirm whether it’s specific to the simulator or also affects physical devices.
I’ve CC’d You and Ramon on the email with more details — please share the emails to invite you to the private repo and the TestFlight build for testing on a real device.
Thanks!
Thank you @aminerol for the repro, I received the invitation to the repository and to the Testflight app. I'll reopen this issue and move it to our backlog so we can eventually investigate it.
I am following this issue for the scrolling lag and frame drops. Let me know if I can help in any way. We would love to be able to turn this feature back on. If you have any estimates or progress updates, I would be very interested in hearing them.
@bj97301 thanks for pinging us on this issue. We are aware of the issue and will investigate it eventually, but as we are quite swamped with open tasks right now, we need to prioritize accordingly.
@bj97301 thanks for pinging us on this issue. We are aware of the issue and will investigate it eventually, but as we are quite swamped with open tasks right now, we need to prioritize accordingly.
Understood. Please keep us updated with any progress. Thank you. 🙏