Skip to content

🐛 Bug: Crash in LayoutAnimationsProxy_Experimental.cpp when ENABLE_SHARED_ELEMENT_TRANSITIONS is enabled #9021

@fluorescent23

Description

@fluorescent23

Description

The app crashes on startup when ENABLE_SHARED_ELEMENT_TRANSITIONS is enabled.

Crash originates from:

/node_modules/react-native-reanimated/Common/cpp/reanimated/LayoutAnimations/LayoutAnimationsProxy_Experimental.cpp:151

function updateLightTree: assertion failed (node && "LightNode not found")

This only happens when shared element transitions are enabled.
If the feature flag is disabled, the app launches normally.

package.json

{
    "name": "APP_NAME",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        "android": "react-native run-android",
        "ios": "react-native run-ios",
        "lint": "eslint .",
        "start": "react-native start",
        "test": "jest"
    },
    "dependencies": {
        "@react-navigation/native": "^7.1.31",
        "@react-navigation/native-stack": "^7.14.2",
        "@reduxjs/toolkit": "^2.11.2",
        "react": "19.2.3",
        "react-native": "0.84.0",
        "react-native-gesture-handler": "^2.30.0",
        "react-native-reanimated": "4.2.2",
        "react-native-safe-area-context": "^5.7.0",
        "react-native-screens": "4.18.0",
        "react-native-worklets": "0.7.4",
        "react-redux": "^9.2.0"
    },
    "devDependencies": {
        "@babel/core": "^7.25.2",
        "@babel/preset-env": "^7.25.3",
        "@babel/runtime": "^7.25.0",
        "@react-native-community/cli": "20.1.0",
        "@react-native-community/cli-platform-android": "20.1.0",
        "@react-native-community/cli-platform-ios": "20.1.0",
        "@react-native/babel-preset": "0.84.0",
        "@react-native/eslint-config": "0.84.0",
        "@react-native/metro-config": "0.84.0",
        "@react-native/typescript-config": "0.84.0",
        "@types/jest": "^29.5.13",
        "@types/react": "^19.2.0",
        "@types/react-test-renderer": "^19.1.0",
        "eslint": "^8.19.0",
        "jest": "^29.6.3",
        "prettier": "2.8.8",
        "react-test-renderer": "19.2.3",
        "typescript": "^5.8.3"
    },
    "engines": {
        "node": ">= 22.11.0"
    },
    "packageManager": "yarn@1.22.22",
    "reanimated": {
        "staticFeatureFlags": {
            "ENABLE_SHARED_ELEMENT_TRANSITIONS": true
        }
    }
}

New Architecture is enabled (Fabric).
Hermes is enabled.
Using createNativeStackNavigator.

Steps to reproduce

  1. Create a new React Native 0.84.0 project (New Architecture enabled by default).
  2. Install Reanimated 4.2.2 and related dependencies.
  3. Enable ENABLE_SHARED_ELEMENT_TRANSITIONS feature flag.
  4. Add sharedTransitionTag to matching components across two screens in a native stack.
  5. Launch the app.

Snack or a link to a repository

https://github.com/fluorescent23/SharedElementTransitionDemo

Reanimated version

4.2.2

Worklets version

0.7.4

React Native version

0.84.0

Platforms

iOS, Android

JavaScript runtime

Hermes

Workflow

React Native CLI

Architecture

New Architecture (Fabric renderer)

Reanimated feature flags

Yes

React Native release level

Stable

Build type

Debug app & dev bundle

Device

Android emulator, iOS simulator

Host machine

macOS

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Labels

Platform: AndroidThis issue is specific to AndroidPlatform: iOSThis issue is specific to iOSRepro providedA reproduction with a snippet of code, snack or repo is provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions