Skip to content

[0.86] Fix Android Fabric Native Animated null prop crash #1329

Description

@leonardorib

Target Branch

0.86

Link to commit or PR to be picked

react/react-native#56913

Description

Cherry-pick react/react-native#56913 into 0.86.

This pick is important for 0.86. From version 0.85 to 0.86 the flag overrideBySynchronousMountPropsAtMountingAndroid was flipped to true:

https://github.com/react/react-native/blob/a8eb4f70c730bc3ee3dba4d9b1ca6f70f0d674d3/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h#L286-L288

That flip makes the code path this PR fixes run by default on 0.86. Without the pick, a Native Animated override for transform/opacity colliding with a later Fabric commit that carries a null value crashes in SurfaceMountingManager on Android.

Our app was actually affected by this crash after we upgraded to 0.86. I patched react-native locally with the fix from the PR and configured the project to build it from source to avoid pre-compiled artifacts and I confirmed it fixed it.

Crash reports out there

react-navigation/react-navigation#13169
software-mansion/react-native-reanimated#9785

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type Pick RequestPick requests to include commits inside a React Native release

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions