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

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

Closed
tido64 opened this issue Feb 11, 2025 · 8 comments
Closed
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. p: Microsoft Partner: Microsoft Partner Platform: Android Android applications.

Comments

@tido64
Copy link
Collaborator

tido64 commented Feb 11, 2025

Description

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,
                                       ~~~^

Steps to reproduce

  1. Clone the reproducer below
  2. Install npm dependencies: yarn
  3. Install Pods:
    cd example
    pod install --project-directory=ios
  4. Build: yarn ios

React Native Version

0.76.7

Affected Platforms

Build - MacOS

Output of npx react-native info

System:
  OS: macOS 14.7.3
  CPU: (10) arm64 Apple M1 Max
  Memory: 1.55 GB / 64.00 GB
  Shell:
    version: 3.7.1
    path: /opt/homebrew/bin/fish
Binaries:
  Node:
    version: 22.13.1
    path: /private/var/folders/j0/5zfnwvyd4sb15smylklx03m00000gn/T/xfs-b74c2fb8/node
  Yarn:
    version: 4.6.0
    path: /private/var/folders/j0/5zfnwvyd4sb15smylklx03m00000gn/T/xfs-b74c2fb8/yarn
  npm:
    version: 10.9.2
    path: ~/.local/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/tido/.gem/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "34"
      - "35"
    Build Tools:
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23339.11.2421.12700392
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 3.4.1
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: true
iOS:
  hermesEnabled: false
  newArchEnabled: false

Stacktrace or Logs

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

Reproducer

microsoft/react-native-test-app#2335

Screenshots and Videos

No response

@tido64
Copy link
Collaborator Author

tido64 commented Feb 11, 2025

cc @cipolleschi

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. labels Feb 11, 2025
@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Feb 11, 2025
@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@cipolleschi
Copy link
Contributor

Is this happening on iOS only, or does it also affect Android?

@cipolleschi
Copy link
Contributor

cipolleschi commented Feb 17, 2025

iOS is working for me: You can see that this is 0.76.7 from the line in the simulator and in the console, and this is the old arch given that concurrentRoot is set to false in the Metro logs

Image

I installed the pods with RCT_NEW_ARCH_ENABLED=0 bundle exec pod install.

Is it possible that there is something missing in RNTA, instead?

Android is working as well for me:

Image

@tido64
Copy link
Collaborator Author

tido64 commented Feb 24, 2025

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'm not sure what's supposed to happen here. Is this a sign of something that hasn't been accounted for? Or is it because react-native-macos is doing something wrong by overwriting the files generated by react-native?

cc @Saadnajmi, @amgleitman

@cipolleschi
Copy link
Contributor

I feel that macos and react-native are misaligned. I'd say that this is a MacOS bug more than a React Native one, tbf...

@tido64
Copy link
Collaborator Author

tido64 commented Feb 25, 2025

I feel that macos and react-native are misaligned. I'd say that this is a MacOS bug more than a React Native one, tbf...

I think react-native-* should be allowed to have different feature flags. But the fact that the iOS file gets overwritten somehow is not the right behaviour. I'm not sure if this is because of how codegen works or a bug in react-native-macos, as I'm not familiar with either, but I'll move the issue here: microsoft#2379

@tido64 tido64 closed this as completed Feb 25, 2025
@Saadnajmi
Copy link
Contributor

Following up here too, it looks like this is because RNM is behind a patch release or two, where reactwg/react-native-releases#687 was picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. p: Microsoft Partner: Microsoft Partner Platform: Android Android applications.
Projects
None yet
Development

No branches or pull requests

5 participants