-
Notifications
You must be signed in to change notification settings - Fork 25k
Closed
Labels
Needs: Triage 🔍Platform: AndroidAndroid applications.Android applications.Type: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
Description
When integrating a custom .so library in the React Native New Architecture, the CMake build succeeds without errors. However, at runtime, the app throws the following error:
TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found
Steps to reproduce
git clone https://github.com/DeanshawnX/music.git
cd music
yarn install
yarn android
React Native Version
0.82.0
Affected Platforms
Runtime - Android
Areas
TurboModule - The New Native Module System
Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
OS: Windows 11 10.0.26100
CPU: (32) x64 Intel(R) Core(TM) i9-14900KF
Memory: 40.24 GB / 63.79 GB
Binaries:
Node:
version: 22.15.1
path: C:\developTool\nvm\nodejs\node.EXE
Yarn:
version: 1.22.22
path: C:\developTool\nvm\nodejs\yarn.CMD
npm:
version: 10.9.2
path: C:\developTool\nvm\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java:
version: 17.0.16
path: C:\developTool\JDK\jdk-17.0.16.8-hotspot\bin\javac.EXE
Ruby: Not Found
npmPackages:
"@react-native-community/cli":
installed: 20.0.0
wanted: 20.0.0
react:
installed: 19.1.1
wanted: 19.1.1
react-native:
installed: 0.82.0
wanted: 0.82.0
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
10-29 12:04:23.964 5248 5321 E ReactNativeJS: [runtime not ready]: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the native binary.
10-29 12:04:23.976 5248 5321 E ReactNativeJS: [runtime not ready]: Error: Non-js exception: AppRegistryBinding::startSurface failed. Global was not installed.
10-29 12:04:23.993 5248 5321 E ReactNativeJS: [runtime not ready]: Error: Non-js exception: AppRegistryBinding::stopSurface failed. Global was not installed.
MANDATORY Reproducer
https://github.com/DeanshawnX/music
Screenshots and Videos

Metadata
Metadata
Assignees
Labels
Needs: Triage 🔍Platform: AndroidAndroid applications.Android applications.Type: New ArchitectureIssues and PRs related to new architecture (Fabric/Turbo Modules)Issues and PRs related to new architecture (Fabric/Turbo Modules)