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

TTID and TTFD are not measured, due to timing issues #2274

Open
givip opened this issue Sep 5, 2024 · 4 comments
Open

TTID and TTFD are not measured, due to timing issues #2274

givip opened this issue Sep 5, 2024 · 4 comments
Assignees

Comments

@givip
Copy link

givip commented Sep 5, 2024

Platform

Flutter Mobile

Obfuscation

Disabled

Debug Info

Enabled

Doctor

[✓] Flutter (Channel stable, 3.24.1, on macOS 14.3 23D56 darwin-arm64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.2)
[✓] Connected device (4 available)
[✓] Network resources

Version

8.8.0

Steps to Reproduce

Sometimes, due to timing issues, the transaction is not registered and consequently not sent to Sentry.

Videos, where repro captured:

Couple initial navigation events registered, but last one not. On screencast, you can see, that there is no message in console.
https://github.com/user-attachments/assets/e8b84e11-7ecb-4dea-8215-9130078469cf
https://github.com/user-attachments/assets/9888c394-f59e-4bf5-9e6f-1fc98d382e36

Minimal code, where I was able to reproduce the issue: https://github.com/givip/sentry_repro

This happens because sometimes method completeTracking() was called earlier than trackRegularRouteTTD()

Expected Result

All transactions should be registered

Actual Result

Sometimes, the transaction is not registered and consequently not sent to Sentry.

Are you willing to submit a PR?

No

@buenaflor
Copy link
Contributor

hey! thanks for raising this, we'll have a look

@buenaflor
Copy link
Contributor

Could you reproduce the same without using SentryDisplayWidget?

@buenaflor
Copy link
Contributor

buenaflor commented Sep 9, 2024

but yes I was able to reproduce it using SentryDisplayWidget:

I/flutter (10200): stop ttid tracking
I/flutter (10200): start ttid tracking

For now I'd suggest not using SentryDisplayWidget until we've fixed this problem

@denrase denrase self-assigned this Sep 17, 2024
@denrase
Copy link
Collaborator

denrase commented Sep 17, 2024

@givip Can you also reproduce it if you provide Sentry with the appRunner?

void main() async {
  await SentryFlutter.init(
    (options) {
        ...
    },
    appRunner: () => runApp(
        SentryDisplayWidget(
          child: const MyApp(),
        )
    ),
  );
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Investigation
Development

No branches or pull requests

3 participants