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

Initing the SDK with the with method will break session replay and autocapture #216

Closed
1 of 2 tasks
marandaneto opened this issue Jan 27, 2025 · 2 comments · Fixed by #217
Closed
1 of 2 tasks

Initing the SDK with the with method will break session replay and autocapture #216

marandaneto opened this issue Jan 27, 2025 · 2 comments · Fixed by #217
Labels
bug Something isn't working Session Replay

Comments

@marandaneto
Copy link
Member

marandaneto commented Jan 27, 2025

  • Android
  • iOS

Version

3.x

Steps to Reproduce

start the SDK with the with method instead of the setup method and do not call the setup method.
Relates to https://posthoghelp.zendesk.com/agent/tickets/23028
The reason is that we capture autocapture and snapshots events with the static instance but the static instance isn't set when you start the SDK with the with method

Expected Result

the SDK should work as expected

Actual Result

no autocapture and snapshots events are captured

@marandaneto marandaneto added bug Something isn't working Session Replay labels Jan 27, 2025
@marandaneto
Copy link
Member Author

@ioannisj i think this can be an issue with iOS as well, can you take a look?

@ioannisj
Copy link

@ioannisj i think this can be an issue with iOS as well, can you take a look?

I think this was a conscious decision to support replay and autocapture integrations only on singleton instance. See this old discussion here.

Since this is already fixed in Android, I'll reference this in PostHog/posthog-ios#206 cause it doesn't make a lot of sense supporting multiple instances but only one API key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Session Replay
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants