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

RN Animated Event, React Native #4714

Open
1 task done
molchanovskiy opened this issue Feb 20, 2025 · 9 comments
Open
1 task done

RN Animated Event, React Native #4714

molchanovskiy opened this issue Feb 20, 2025 · 9 comments

Comments

@molchanovskiy
Copy link

molchanovskiy commented Feb 20, 2025

What happened?

Test is stuck on device.launchApp

More logs in "Detox logs"

  data: {
    "type": "currentStatusResult",
    "params": {
      "messageId": 4,
      "status": {
        "busy_resources": [
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },

What was the expected behaviour?

launchApp should run success so tests are started

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.34.1
React Native version: 0.76.8
Has Fabric (React Native's new rendering system) enabled: yes
Node version: 23
Test-runner (select one): jest

Detox logs

Detox logs
ws-server@53586 send
  data: {
    "type": "currentStatusResult",
    "params": {
      "messageId": 4,
      "status": {
        "busy_resources": [
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onHeaderHeightChange"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "dispatch_queue",
            "description": {
              "queue": "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)",
              "works_count": 4
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },

Device logs

Device logs
ws-server@53586 send
  data: {
    "type": "currentStatusResult",
    "params": {
      "messageId": 4,
      "status": {
        "busy_resources": [
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onHeaderHeightChange"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "dispatch_queue",
            "description": {
              "queue": "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)",
              "works_count": 4
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 596 Event: onTransitionProgress"
            }
          },
          {
            "name": "one_time_events",
            "description": {
              "event": "RN Animated Event",
              "object": "View: 520 Event: onTransitionProgress"
            }
          },

More data, please!

My init.js

beforeAll(async () => {
  console.log("Before All");
  // This tells Detox to install the app and launch it
  await device.launchApp({
    newInstance: true,
    // This disables animations at the RN bridge level
    permissions: {
      notifications: "NO",
      location: "never", // Add if using location
    },
    launchArgs: {
      RCTAnimationEnabled: false,
      detoxDisableAnimations: "YES",
      // Reduce the animation duration to near-zero
      UIAnimationDragCoefficient: "10000",
      // Disable JS animations
      DETOX_DISABLE_ANIMATIONS: "1",
      // Stability Flags
      detoxURLBlacklistRegex: '\\(".*"\\)', // Block all external URLs
      detoxDebugVisibility: "NO", // Disable debug overlay
      // iOS-Specific
      AppleInterfaceStyle: "Light",
      ConnectHardwareKeyboard: "0",
      // detoxURLBlacklistRegex:
      //   '\\("^https://api-external.staging.apps.gyg.com.au/*"\\)',
      detoxDisableWebKitSecurity: true,
      DTXDisableMainRunLoopSync: true,
    },
    // Additional device settings
    deviceLaunchArgs: {
      reduceMotion: "1",
      reduceTransparency: "1",
      nonAnimatedRendering: "1",
    },
  });
});
@MarcelinaZiolkiewicz
Copy link

Try to add

launchArgs: {
      detoxEnableSynchronization: 0,
},

@lkosiorowski
Copy link

Disabling synchronization will break the tests in most of the cases. I just downgraded detox to 20.32.0 and waiting for the fix 🤞

@asafkorem
Copy link
Contributor

Fix released with #4717
Try version 20.34.2

@anisalfen
Copy link

anisalfen commented Feb 25, 2025

I still have this issue even with 20.34.3 version , try to downgrade for now to 20.33.0

@sergiomap
Copy link

The event "RN Animated Event" is taking place with object: "View: 43 Event: onTransitionProgress".
same issue here in v20.34.3

@RnbWd
Copy link

RnbWd commented Feb 26, 2025

same issue, downgrading helps, but I'm upgrading an older project so still have other issues, ran into The event "RN Animated Event" is taking place with object: "View: 43 Event: onTransitionProgress". which went away when I downgraded detox to 20.33.0

@aimeerivers
Copy link

i had the same problem with 20.34.3 - very bad for my first experience of Detox; i thought it was something i was doing wrong, but turns out it was just a bug in Detox.

thanks to those who recommended downgrading to 20.33.0 - now i am able to get started writing some tests!

@asafkorem
Copy link
Contributor

asafkorem commented Feb 28, 2025

@aimeerivers, @RnbWd, @sergiomap, @anisalfen, @lkosiorowski, @MarcelinaZiolkiewicz, @molchanovskiy
please update to 20.34.4.
☝ This version fixes a regression from our React Native’s new architecture support changes causing sync issues with RN animations, likely due to infinite animations in the tested app. This updated animation handling should prevent Detox from getting stuck on it.

If you still have issues with synchronization, Detox is an open-source project - feel more than free to assist by investigating issues or providing minimal repro repos. As for flagging issues: please include environment details and provide more context for reproduction (e.g., RN version, Fabric), check this section.

@aimeerivers
Copy link

@aimeerivers, @RnbWd, @sergiomap, @anisalfen, @lkosiorowski, @MarcelinaZiolkiewicz, @molchanovskiy
please update to 20.34.4.

thank you @asafkorem 20.34.4 does indeed fix it!!

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

No branches or pull requests

8 participants