Skip to content

RoutingInstrumentation stall tracking causes some reanimated animation to flicker #3987

Closed as not planned

Description

@fdecampredon

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.26.0

react-native version: 0.74.3

Are you using Expo?

  • Yes
  • [ x] No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(@sentry/react-native)

const routingInstrumentation = new Sentry.RoutingInstrumentation();

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  enabled: !__DEV__,
  environment: process.env.DEPLOYMENT_ENVIRONMENT,
  integrations: [
    new Sentry.ReactNativeTracing({
      routingInstrumentation,
    }),
  ],
});

I have the following issue:
Some large animations using react-native-reanimated and involving animating padding, height and transform are flickering when sentry is enabled, setting enableStallTracking to false in Sentry.ReactNativeTracing options solves the issue.

Steps to reproduce:
It's unfortunately hard to create a minimal reproduction example. The bug only appears on complex animation involving height and or padding, I'll try later if I can isolate a more specific reproduction case.

Actual result:
Those animations are flickering/jerking

Expected result:
No interferences between reanimated and sentry

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Aug 2, 2024
  2. krystofwoldrich commented on Aug 5, 2024

    @krystofwoldrich
    Contributor

    @fdecampredon Thank you for the message, I understand that it's difficult to reproduce.

    Could you share some example animation, where you are seeing the flicker, event if in new app it works it might help us debug the issue.

    Does this affect animation driven by JS or by native or both? As disabling stall tracking helped I would assume the JS drive animations are affected.

  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Aug 5, 2024
  4. moved this to Waiting for: Community in GitHub Issues with 👀 3on Aug 5, 2024
  5. getsantry commented on Aug 27, 2024

    @getsantry

    This issue has gone three weeks without activity. In another week, I will close it.

    But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


    "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

  6. krystofwoldrich commented on Aug 30, 2024

    @krystofwoldrich
    Contributor

    Closing this due to inactivity. If this is still an issue feel free to comment here or open a new issue if the context changed.

  7. matinzd commented on Oct 16, 2024

    @matinzd

    This is still happening and it's actively affecting users on production!

    Related:
    kirillzyusko/react-native-keyboard-controller#641

  8. matinzd commented on Oct 16, 2024

    @matinzd

    After some digging the likely cause is setting a lot of setTimeouts inside the interation:

    state.timeout = setTimeout(state.iteration, LOOP_TIMEOUT_INTERVAL_MS);

    It is scheduling running itself after 50 ms. Not sure how this can be optimized as it's above my pay grade.

  9. matinzd commented on Oct 17, 2024

    @matinzd

    The issue is fixed in v6 with the new stall tracking integration:

    #3997

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions