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

BUG : Can't use session recording on Web environment #151

Closed
1 task done
Kiruel opened this issue Jan 31, 2024 · 5 comments
Closed
1 task done

BUG : Can't use session recording on Web environment #151

Kiruel opened this issue Jan 31, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Kiruel
Copy link

Kiruel commented Jan 31, 2024

Describe the bug
Please provide the following information:

  1. I want to use session record from PostHog on a Web environment.

Which platform is the issue occurring on
Is the error occurring on:

  • Web

Expected behavior
Should send session record to postHog without any setting (at-least on web env).

To Reproduce
Steps to reproduce the behaviour:

  1. Initialise Flutter SDK on web env
  2. Make some events
  3. No session record send to posthog.

Version of the Flutter SDK
Please provide the following information:

  1. The version of the Rudder Flutter SDK you are using (e.g., Rudder Flutter SDK v1.0.0)
    • rudder_sdk_flutter: ^2.8.0

SDK initialisation snippet
Share the code snippet used for initializing the Flutter SDK.

We use our own dataplaneurl and our own destSDKBaseURL.

  _rudderController = RudderController.instance;
 final RudderConfigBuilder builder = RudderConfigBuilder();
    builder.withDataPlaneUrl('URL');
    builder.withControlPlaneUrl('URL');
    builder.withLogLevel(RudderLogger.NONE);
    builder.withWebConfig(
      WebConfig(
        destSDKBaseURL: 'URL',
      ),
    );
    _rudderController?.initialize(
      dotenv.env['RUDDERSTACK_WRITE_KEY']!,
      config: builder.build(),
    );

Framework version of the SDK

➜  pia_narrative git:(main) ✗ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.7, on macOS 14.0 23A344 darwin-arm64, locale en-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.85.2)
[✓] Network resources

• No issues found!

Check for Correct Usage of writeKey and dataPlaneUrl
It work when send simple event. But not session record.

@Kiruel Kiruel added the bug Something isn't working label Jan 31, 2024
@desusai7
Copy link
Contributor

desusai7 commented Feb 1, 2024

Hey @Kiruel,

Were you using posthog through device mode or cloud mode ?

@Kiruel
Copy link
Author

Kiruel commented Feb 1, 2024

We use device mode.
Screenshot 2024-02-01 at 14 19 50

@desusai7
Copy link
Contributor

desusai7 commented Feb 1, 2024

Can you please share your website url / your write key to help us understand more about the issue ?

You can DM them through slack as well by joining our community

@Kiruel
Copy link
Author

Kiruel commented Feb 1, 2024

I just DM you on slack thanks.

@Kiruel
Copy link
Author

Kiruel commented Feb 1, 2024

Based on the conversion we have on slack, we find the problem. First Flutter Web is not compatible right now for session record.
So I have to change the configuration on Rudderstack dashboard to use source as JS and not Flutter, then change the key to the JS key for Web environment.

Second thing on PostHog I had to add my domain to enable session record:
Screenshot 2024-02-01 at 17 38 52

You can find in Settings/Session Replay/Authorized Domains for Replay in PostHog.

Thanks for your time again @desusai7 , have nice day.

@Kiruel Kiruel closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants