Skip to content

[Android][0.79] TurboModuleRegistry.getEnforcing('RNMapsAirModule') error – module not registered in native binary #50759

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

Closed
fobos531 opened this issue Apr 16, 2025 · 4 comments
Labels
Needs: Triage 🔍 Newer Patch Available Platform: Android Android applications. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)

Comments

@fobos531
Copy link

fobos531 commented Apr 16, 2025

Description

@cipolleschi

This is actually kind of similar to #50697 - as it is the exact same error but on Android. See here for a bit more context: react-native-maps/react-native-maps#5424

Basically, it looks like something changed in the codegen process specifically between 0.77 and 0.79, since it works perfectly on 0.77 but not on 0.79.

I have a feeling it is related to this commit where it seems like codegen is much more strict about allowed types in the codegen native commands: 825492b#diff-6a85605fb6d3af7508855ba2db087f115058d7fe15e0ee6670f2dfce84671fff

And react-native-maps uses objects in the TS defs, see: https://github.com/react-native-maps/react-native-maps/blob/master/src/MapViewNativeComponent.ts#L22

Is this an issue in react-native, or in the library implementation? If its the latter, do you have suggestions/pointers on how best to fix it?

cc @salah-ghanim

Steps to reproduce

  1. Add your maps api key to the android manifest
  2. Compile and run the android app
  3. Use npx expo start to be able to connect to the dev server

React Native Version

0.79.1

Affected Platforms

Runtime - Android

Areas

TurboModule - The New Native Module System

Output of npx @react-native-community/cli info

System:
  OS: macOS 15.3.2
  CPU: (10) arm64 Apple M1 Pro
  Memory: 135.14 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.11.0
    path: ~/.nvm/versions/node/v22.11.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.yarn/bin/yarn
  npm:
    version: 10.9.0
    path: ~/.nvm/versions/node/v22.11.0/bin/npm
  Watchman:
    version: 2025.04.07.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/lib/ruby/gems/3.4.0/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:
      - "26"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 26.0.3
      - 29.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
      - 35.0.0
    System Images:
      - android-26 | Google APIs Intel x86 Atom_64
      - android-28 | Google ARM64-V8a Play ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
      - android-35-ext14 | Google Play ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.24978.46.2431.13208083
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /usr/bin/javac
  Ruby:
    version: 3.3.8
    path: /opt/homebrew/opt/ruby@3.3/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.0
    wanted: 0.79.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

2025-04-16 13:14:58.009  7626-7668  nativeloader            com.jakov.glavina.MapsAndroidRepro   D  Load /data/app/~~Z24bqwHOzpIXnTFyNgwT1w==/com.jakov.glavina.MapsAndroidRepro-NMIyXMl4SZBdaSIHS6p6Xg==/base.apk!/lib/arm64-v8a/libworklets.so using ns clns-7 from class loader (caller=/data/app/~~Z24bqwHOzpIXnTFyNgwT1w==/com.jakov.glavina.MapsAndroidRepro-NMIyXMl4SZBdaSIHS6p6Xg==/base.apk!classes20.dex): ok
2025-04-16 13:14:58.023  7626-7668  nativeloader            com.jakov.glavina.MapsAndroidRepro   D  Load /data/app/~~Z24bqwHOzpIXnTFyNgwT1w==/com.jakov.glavina.MapsAndroidRepro-NMIyXMl4SZBdaSIHS6p6Xg==/base.apk!/lib/arm64-v8a/libreanimated.so using ns clns-7 from class loader (caller=/data/app/~~Z24bqwHOzpIXnTFyNgwT1w==/com.jakov.glavina.MapsAndroidRepro-NMIyXMl4SZBdaSIHS6p6Xg==/base.apk!classes20.dex): ok
2025-04-16 13:14:58.024  7626-7668  apsAndroidRepro         com.jakov.glavina.MapsAndroidRepro   W  CheckJNI: method to register "installJSIBindings" not in the given class. This is slow, consider changing your RegisterNatives calls.
2025-04-16 13:14:58.170  7626-7668  ReactNativeJS           com.jakov.glavina.MapsAndroidRepro   E  'Invariant Violation: TurboModuleRegistry.getEnforcing(...): \'RNMapsAirModule\' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes', { [Component Stack] name: 'Component Stack' }
2025-04-16 13:14:58.173  7626-7668  ReactNativeJS           com.jakov.glavina.MapsAndroidRepro   W  'Route "./(tabs)/index.tsx" is missing the required default export. Ensure a React component is exported as default.', { [Component Stack] name: 'Component Stack' }
2025-04-16 13:14:58.274  7626-7633  System                  com.jakov.glavina.MapsAndroidRepro   W  A resource failed to call release. 
2025-04-16 13:14:58

Reproducer

https://github.com/fobos531/react-native-maps-repro

Screenshots and Videos

Image

@fobos531 fobos531 added Needs: Triage 🔍 Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules) labels Apr 16, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.79.1. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot react-native-bot added the Platform: Android Android applications. label Apr 16, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@fobos531
Copy link
Author

To answer the react-native-bot, I have tried with the latest patch and the issue is still there. I have edited the original issue to reflect this

@cipolleschi
Copy link
Contributor

Thanks @fobos531 for the issue. This is more like a linking problem, where the app can't find the RNMapsAirModule. I see that react-native-maps does not work with the regular autolinking provided by React Native.
For example, for iOS, it requires a manual configuration of the Podfile, as explained in react-native-maps/react-native-maps#5400.

I think these are issues in react-native-maps that the library maintainers have to solve to provide a smooth experience with their libraries.
The commit you found is a fix for Codegen that was not behaving correctly, so if the library stopped working because of that, it was doing something wrong in the first place, and they should update the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Newer Patch Available Platform: Android Android applications. Type: New Architecture Issues and PRs related to new architecture (Fabric/Turbo Modules)
Projects
None yet
Development

No branches or pull requests

3 participants