Skip to content

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

@fobos531

Description

@fobos531

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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