Skip to content
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

RN Session replay plugin isn't starting a new recording after app restart #268

Closed
1 of 4 tasks
marandaneto opened this issue Sep 21, 2024 · 5 comments · Fixed by #271
Closed
1 of 4 tasks

RN Session replay plugin isn't starting a new recording after app restart #268

marandaneto opened this issue Sep 21, 2024 · 5 comments · Fixed by #271

Comments

@marandaneto
Copy link
Member

Bug description

Context PostHog/posthog#13269 (comment)
This is by design but I understand why it isn't obvious.
On RN, the session only rotates if the app is inactive for more than 30 minutes, and the session ID survives app restart which is different than Android and iOS.
Changing this would break the behavior of people who rely on this for session durations.
So we have a few options here, change the behavior and break compatibility, add a flag to opt in to the new behavior, or else.

How to reproduce

Related sub-libraries

  • All of them
  • posthog-web
  • posthog-node
  • posthog-react-native

Additional context

Thank you for your bug report – we love squashing them!

@chasem-dev
Copy link

chasem-dev commented Sep 25, 2024

@marandaneto I just tried this build since it contains both the Identity and sesion changes. When I'm compiling, I'm noticing a strange error preventing my app from bundling. Seems like it's more related to the identity ticket?

image image
[RUN_FASTLANE] ▸ ** ARCHIVE FAILED **
[RUN_FASTLANE] ▸ The following build commands failed:
[RUN_FASTLANE] ▸        SwiftEmitModule normal arm64 Emitting\ module\ for\ posthog_react_native_session_replay (in target 'posthog-react-native-session-replay' from project 'Pods')
[RUN_FASTLANE] ▸ (1 failure)
[RUN_FASTLANE] ** ARCHIVE FAILED **
[RUN_FASTLANE] 
[RUN_FASTLANE] 
[RUN_FASTLANE] The following build commands failed:
[RUN_FASTLANE]  SwiftEmitModule normal arm64 Emitting\ module\ for\ posthog_react_native_session_replay (in target 'posthog-react-native-session-replay' from project 'Pods')
[RUN_FASTLANE] (1 failure)
[RUN_FASTLANE] Exit status: 65

@chasem-dev
Copy link

chasem-dev commented Sep 27, 2024

I found where it looks like you exposed the variable:
PostHog/posthog-ios@501cc8e

It seems like the version bump maybe wasn't picked up in a release?
PostHog/posthog-ios@333ca7f

Which library uses the posthog-ios dependency?

@marandaneto
Copy link
Member Author

@chasem-dev have you upgraded your pods? Try to clean and install your pods, the session replay plugin uses the iOS SDK

@chasem-dev
Copy link

@marandaneto That worked! I ran cd ios and then did pod update. Testing things out now. Sorry for the false alarm! Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants