Skip to content

[0.76] Error: no member named 'allowRecursiveCommitsWithSynchronousMountOnAndroid' #2379

Open
@tido64

Description

@tido64

Environment

react-native -v: 0.76.7
npm ls react-native-macos: 0.76.6
node -v: v22.13.1
xcodebuild -version: 16.2

Steps to reproduce the bug

  1. Clone chore: bump react-native to 0.76 react-native-test-app#2335
  2. Install npm dependencies: yarn
  3. Install Pods:
    cd example
    pod install --project-directory=ios
  4. Build: yarn ios

Expected Behavior

iOS builds successfully.

Actual Behavior

Old Architecture on 0.76.7 fails to build because it cannot find allowRecursiveCommitsWithSynchronousMountOnAndroid:

[React-featureflagsnativemodule] Compiling NativeReactNativeFeatureFlags.cpp
Error: no member named 'allowRecursiveCommitsWithSynchronousMountOnAndroid' in 'facebook::react::NativeReactNativeFeatureFlags'
          bridging::getParameterCount(&T::allowRecursiveCommitsWithSynchronousMountOnAndroid) == 1,
                                       ~~~^

Reproducible Demo

microsoft/react-native-test-app#2335

Additional context

This seems to only happen if you also have react-native-macos installed. The generated FBReactNativeSpecJSI.h will include allowRecursiveCommitsWithSynchronousMountOnAndroid because it hasn't been removed from react-native-macos yet.

I think out-of-tree platforms should be able to have different feature flags. The fact that it overwrites iOS's FBReactNativeSpecJSI.h sounds like a bug/limitation to me.

Previously filed here: facebook#49321

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions