Repository navigation
Description
Bug description
React Native session replay appears to force screenshot mode on both native platforms, with no JS config option to use mobile wireframe mode instead.
The public mobile replay docs describe wireframe mode as the default and screenshot mode as opt-in:
https://posthog.com/docs/session-replay/mobile#wireframe-mode-default
However, the current posthog-react-native-session-replay native bridge enables screenshot mode unconditionally:
- iOS:
config.sessionReplayConfig.screenshotMode = true
https://github.com/PostHog/posthog-react-native-session-replay/blob/1.6.0/ios/PosthogReactNativeSessionReplay.swift#L39 - Android:
sessionReplayConfig.screenshot = true
https://github.com/PostHog/posthog-react-native-session-replay/blob/1.6.0/android/src/main/java/com/posthogreactnativesessionreplay/PosthogReactNativeSessionReplayModule.kt#L88
That means React Native apps cannot opt into wireframe mode through sessionReplayConfig, even though wireframe mode would avoid screenshot capture costs and reduce privacy/performance risk.
This is especially painful on Android because screenshot capture has been involved in layout/safe-area glitches such as #3140. In our app, we previously had to disable Android replay entirely. We would like to re-enable Android replay, but use wireframe mode on both iOS and Android.
Expected outcome
React Native session replay should either:
- default to wireframe mode, matching the mobile replay docs, or
- expose a JS config option such as
sessionReplayConfig.screenshotMode/sessionReplayConfig.screenshot/sessionReplayConfig.captureModeso apps can choose wireframe vs screenshot mode per platform.
Actual outcome
posthog-react-native-session-replay forces screenshot mode in native code, so React Native apps need a dependency patch or native fork to use wireframe mode. That requires native rebuilds and is brittle.
Related sub-libraries
- All of them
- posthog-js (web)
- posthog-js-lite (web lite)
- posthog-node
- posthog-react-native
- @posthog/react
- @posthog/ai
- @posthog/convex
- @posthog/nextjs-config
- @posthog/nuxt
- @posthog/rollup-plugin
- @posthog/webpack-plugin
Environment
posthog-react-native: 4.45.5posthog-react-native-session-replay: 1.5.8 locally; confirmed current upstream1.6.0still has the same hard-coded screenshot mode- React Native / Expo app
- Affected platforms: iOS and Android
Activity
dustinbyrne commentedon Jun 10, 2026
Hey @fkreinh, thanks for the issue! You're right that the docs are misleading here. The "wireframe mode (default)" header applies to the native Android and iOS SDKs. React Native intentionally forces screenshot mode in the native bridge, same as Flutter (whose docs do note this, while the RN docs don't). I'll fix up the documentation to make that explicit.
The reason it's forced is that we don't currently have a wireframe capture implementation for React Native itself. The native SDKs for Android and iOS do support wireframe mode, but they're designed around UIKit/Android view hierarchies. React Native renders via its own view subclasses that the wireframe capture doesn't currently recognize.
Regarding #3140, are you still experiencing similar layout issues on the latest version(s)?
fkreinh commentedon Jun 19, 2026
@dustinbyrne Thanks for clarifying.
On our side, we keep PostHog session replay disabled on Android because the performance overhead was too high. On iOS, screenshot-mode replay works reasonably well, but we still see occasional OS watchdog terminations, likely from RAM pressure. Throttling and image masking made it manageable, but it remains a tradeoff.
I’d like to see wireframe mode become a first-party React Native implementation. I patched the RN session replay lib to avoid forced screenshot mode and use the native wireframe path, but the recordings were not usable for our CS/product team, especially because React Native text was not captured/rendered correctly.
We’re not blocked on #3140 specifically. The broader issue is that screenshot mode is expensive on image-heavy/high-activity screens, while React Native wireframe mode is not production-ready today.
Screenshots from the patched wireframe attempt:
fkreinh commentedon Jun 19, 2026
One follow-up: I’m trying to downscale iOS replay screenshots from native device scale to
1x.For our base, that’s usually
3x -> 1xon iPhone 14+ devices, which should make screenshot-mode replay lighter. Today I have to patch the generated Podfile with an Expo config plugin to rewrite the PostHog iOS pod after install.It would be great if this were a first-party RN replay prop, e.g.
sessionReplayConfig.screenshotScale, so apps can trade sharpness for lower memory/perf cost.Relevant iOS code:
https://github.com/PostHog/posthog-ios/blob/6fa078ec4f9439389ad9f2e05692774691c3dbd7/PostHog/Replay/UIView%2BUtil.swift#L58
Hacky plugin code
withPostHogReplayScreenshotScale.jsgithub-actions commentedon Jul 7, 2026
AI triage for #3796
Conclusion: Valid React Native session replay feature request; RN currently forces screenshot mode and has no supported wireframe mode option.
Confidence: 93%
Suggested labels:
enhancement,feature/replay,react-native,feature/mobile,iOS,Android@PostHog/team-client-libraries please review this sweep triage.
Confirmed from the current repo that React Native replay still has no public capture-mode option and the native bridge forces screenshot mode on both platforms.
A small JS config passthrough would be mechanically possible, but based on the maintainer clarification and the reporter's patched experiment, simply setting the native SDK to wireframe would expose an unsupported/poor-quality RN recording path rather than a production-ready RN wireframe implementation. This should stay tracked as a mobile replay enhancement, with a separate docs clarification if not already handled.
Investigation
packages/react-native/src/types.tsdefinesPostHogSessionReplayConfigwith masking, logs, network telemetry, throttle/debouncer,screenshotModeBackgroundCapture, andsampleRate, but noscreenshot,screenshotMode,captureMode, orscreenshotScaleoption.packages/react-native/src/posthog-rn.tsbuildssdkReplayConfigfrom the exposed JS config and forwards it to the optional native plugin, but it does not include any capture-mode or screenshot-scale setting.packages/react-native-plugin/ios/PosthogReactNativePlugin.swiftunconditionally setsconfig.sessionReplayConfig.screenshotMode = truebefore applying the rest of the replay config.packages/react-native-plugin/android/src/main/java/com/posthogreactnativeplugin/PosthogReactNativePluginModule.ktunconditionally setssessionReplayConfig.screenshot = truebefore applying log/throttle/masking/sample-rate settings.packages/react-native/src/optional/OptionalPlugin.tsresolves@posthog/react-native-pluginfirst and falls back toposthog-react-native-session-replay, so this native bridge path is the relevant integration path for RN replay.packages/react-native-plugin/CHANGELOG.mdfor fix(react-native-plugin): drop duplicate native captures of fatal JS errors and apply replay config at setup #3824 explicitly says replay config is applied so later recording uses screenshot mode instead of wireframe/default settings, which supports the maintainer comment that screenshot mode is intentional today.Relevant files:
packages/react-native/src/types.ts,packages/react-native/src/posthog-rn.ts,packages/react-native/src/optional/OptionalPlugin.ts,packages/react-native-plugin/ios/PosthogReactNativePlugin.swift,packages/react-native-plugin/android/src/main/java/com/posthogreactnativeplugin/PosthogReactNativePluginModule.kt,packages/react-native-plugin/posthog-react-native-plugin.podspec,packages/react-native-plugin/android/build.gradle,packages/react-native-plugin/CHANGELOG.mdFix assessment
screenshotMode=falseswitch is small but would likely create an unsupported/broken capture mode rather than solving the feature request. A production fix needs RN-specific wireframe capture semantics and cross-platform native work.Fix PR skipped: feature requests require an explicit trusted fix command or mode: fix before opening a draft PR
Pi session
The JSONL pi session file(s) for this run were saved to the
posthog-watcher-statebranch. Download one locally, then fork it into your own pi session:Saved session files:
call-1-1-2026-07-07T09-31-46-332Z_019f3beb-551c-7946-a791-484d64a74cec.jsonlClose proposal
None. No issue close action was taken.
Generated by posthog-watcher-action using pi.
4shutosh commentedon Sep 2, 2026
Forced screenshot mode is blocking us from safely keeping Android replay enabled.
We see repeated production OOMs across several users and devices, mostly on media-heavy screens. The screenshot allocation path matches the memory pressure described in PostHog/posthog-android#750.
A supported lower-memory capture mode or screenshot scale would help us keep replay enabled.
marandaneto commentedon Sep 5, 2026
we'll deprecate wireframe mode in favor of snapshots only
the perf issues in snapshot mode will be addressed separately