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

Session Replay support for Flutter on Mobile #1193

Closed
bruno-garcia opened this issue Dec 16, 2022 · 31 comments · Fixed by #2208
Closed

Session Replay support for Flutter on Mobile #1193

bruno-garcia opened this issue Dec 16, 2022 · 31 comments · Fixed by #2208

Comments

@bruno-garcia
Copy link
Member

Add support for Sentry's Session Replay: https://sentry.io/for/session-replay/

@marandaneto marandaneto moved this to Needs Discussion in Mobile & Cross Platform SDK Dec 20, 2022
@ryan953 ryan953 changed the title Session Replay support Session Replay support for Dart Feb 2, 2023
@brustolin brustolin moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Feb 2, 2023
@bruno-garcia bruno-garcia changed the title Session Replay support for Dart Session Replay support for Flutter Feb 16, 2023
@Rafik-Belkadi-malou
Copy link

from how many thumbs up will you start to consider its implementation?

@marandaneto
Copy link
Contributor

from how many thumbs up will you start to consider its implementation?

This is blocked by flutter/flutter#117382

@marandaneto marandaneto moved this from Backlog to Blocked in Mobile & Cross Platform SDK Jul 8, 2023
@YasserDRIF
Copy link

We are using Smartlook currently, Adding this to Sentry would be amazing

@bruno-garcia
Copy link
Member Author

bruno-garcia commented Jan 12, 2024

We're working on it! Wanna join the early adopter release? Join the waitlist and discussion about the feature:

@vaind
Copy link
Collaborator

vaind commented Jul 24, 2024

Replay alpha version now available for Android in 8.6.0-alpha.2 - please share any and all feedback.

To try out replay, you can set following options:

await SentryFlutter.init(
  (options) {
    ...
    options.experimental.replay.sessionSampleRate = 1.0;
    options.experimental.replay.errorSampleRate = 1.0;
  },
  appRunner: () => runApp(MyApp()),
);

Access is limited to early access orgs on Sentry. If you're interested, sign up for the waitlist

@mcosti
Copy link

mcosti commented Jul 25, 2024

Where should we post the issues we find? In this topic or each in a separate issue?

Here's what I found so far:

[sentry] [debug] WidgetFilter obscuring: Text("Editor")
[sentry] [debug] WidgetFilter obscuring: Text("My Festivals")
[sentry] [debug] WidgetFilter obscuring: Text("Messages")
[sentry] [debug] WidgetFilter obscuring: Text("Profile")
[sentry] [error] Replay: failed to capture screenshot.
         'dart:ui/painting.dart': Failed assertion: line 26 pos 10: '<optimized out>': Rect argument contained a NaN value.
         #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
         #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
         #2      _rectIsValid (dart:ui/painting.dart:26:10)
         #3      _NativeCanvas.drawRect (dart:ui/painting.dart:5936:12)
         #4      ScreenshotRecorder._obscureWidgets (package:sentry_flutter/src/replay/recorder.dart:137:14)
         #5      ScreenshotRecorder._capture (package:sentry_flutter/src/replay/recorder.dart:103:9)
         <asynchronous suspension>
         #6      Scheduler._run.<anonymous closure> (package:sentry_flutter/src/replay/scheduler.dart:53:41)
         <asynchronous suspension>

Also, quite low performance, especially on Android. I am developing a chat app and I can see a ton of logs for obscuring data, including the bottom navigation which gets obscured on every scroll. (Although not technically re-rendered).

Edit: I do not see any recordings showing up for iOS and for Android, the whole 9 minute recording is stuck on the initial first tab (not the loading screen, but the first screen from the navigation bar). I can see the network logs as I'm scrolling through my app, but the recording itself is stuck.

[✓] Flutter (Channel stable, 3.22.3, on macOS 14.1 23B74 darwin-arm64, locale en-NL)

@vaind
Copy link
Collaborator

vaind commented Jul 25, 2024

@mcosti I've tried to reproduce what you're seeing with NaN with PageView but couldn't. Any chance you can come up with a repro that you're able to share?

@vaind
Copy link
Collaborator

vaind commented Sep 5, 2024

TODOs

@rhinck
Copy link

rhinck commented Sep 7, 2024

I apologize for my ignorance, but does this issue being closed indicate that there is now Flutter support for session replay? If so, how would I go about trying it out in my project? (I couldn't seem to find any docs offering additional information)

@vaind
Copy link
Collaborator

vaind commented Sep 8, 2024

Session Replay beta for iOS and Android should come out in the next release

@buenaflor
Copy link
Contributor

It's available starting from Sentry Flutter 8.9.0

@bruno-garcia
Copy link
Member Author

@vaind could you help get it on our docs? https://docs.sentry.io/platforms/flutter/

If we add a note that it's experimental, like we did for the other SDKs, it should be OK. Now is the time since we expect to GA this in a a month or two.

@darkfrog26
Copy link

Session Replay beta for iOS and Android should come out in the next release

I presume this means that it's not supported for Flutter Web?

@buenaflor
Copy link
Contributor

buenaflor commented Oct 9, 2024

I presume this means that it's not supported for Flutter Web?

It's not available on Flutter Web, at least not yet. I have a working experimental/draft implementation but I can't give a sure timeline when this will be available

The draft implementation is not sufficient due to PII

@darkfrog26
Copy link

@buenaflor thanks for the info, I appreciate it.

@ant1m4tt3r
Copy link

if we use this experimental feature would we be able to see the replays in my sentry dashboard? looks like it still isn't available i guess. am i missing something?

Image

@bruno-garcia
Copy link
Member Author

if we use this experimental feature would we be able to see the replays in my sentry dashboard? looks like it still isn't available i guess. am i missing something?

Image

Yeah we just haven't updated Sentry to consider Flutter as supported. But if you send the data, it'll show up.

@ant1m4tt3r
Copy link

thanks @bruno-garcia. for some reason i can't see the data yet, even though the app is running with the replay feature on. i'm looking into it, it may be some misconfiguration or something that i am missing.

should the replay work in a debug build or only in release mode?

@vaind
Copy link
Collaborator

vaind commented Oct 15, 2024

should the replay work in a debug build or only in release mode?

Works in debug build too. You can try turning on debug logging in options to get more info on what's going on.

@bruno-garcia
Copy link
Member Author

thanks @bruno-garcia. for some reason i can't see the data yet, even though the app is running with the replay feature on. i'm looking into it, it may be some misconfiguration or something that i am missing.

should the replay work in a debug build or only in release mode?

Are you a member of an enterprise org on Sentry SaaS? That's the only thing I can think of. Our open beta is only available to self-serve orgs right now.

If that's the case, can you create a free developer account, and try there, does it work?

@coffeeispower
Copy link

thanks @bruno-garcia. for some reason i can't see the data yet, even though the app is running with the replay feature on. i'm looking into it, it may be some misconfiguration or something that i am missing.
should the replay work in a debug build or only in release mode?

Are you a member of an enterprise org on Sentry SaaS? That's the only thing I can think of. Our open beta is only available to self-serve orgs right now.

If that's the case, can you create a free developer account, and try there, does it work?

I'm also trying to use this feature but it just refuses to work, it doesn't send the replay or at least sentry is not accepting it. I just created the sentry account for the project, it's a developer plan org.

@nrajput05
Copy link

I presume this means that it's not supported for Flutter Web?

It's not available on Flutter Web, at least not yet. I have a working experimental/draft implementation but I can't give a sure timeline when this will be available

Is this still not available for flutter web ?

@buenaflor
Copy link
Contributor

buenaflor commented Nov 8, 2024

Is this still not available for flutter web ?

no, as I said above I can't give a sure timeline when this will be available, it could still take a long time until we properly tackle this. I will write it here if I have any further information/updates

@skiunke
Copy link

skiunke commented Nov 17, 2024

Is this still not available for flutter web ?

no, as I said above I can't give a sure timeline when this will be available. I will write it here if I have any further information/updates

would a potential implementation cover WASM support?

@bruno-garcia bruno-garcia changed the title Session Replay support for Flutter Session Replay support for Flutter on Mobile Nov 24, 2024
@bruno-garcia
Copy link
Member Author

Is this still not available for flutter web ?

no, as I said above I can't give a sure timeline when this will be available. I will write it here if I have any further information/updates

would a potential implementation cover WASM support?

I updated the title of the issue to be clear but this support is all about Android and iOS at this time. While our JS SDK could record a replay from Flutter Web, it would be based off of our web canvas support, have no masking at all and quite high overhead. So it would require a new approach for Flutter Web which we didn't look into yet.

@getsentry getsentry locked as resolved and limited conversation to collaborators Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.