Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

messaging() JS TurboModule returns undefined on RN 0.87.1 with New Architecture (app module works fine)"

Closed
#9,349 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
firebase, javascript, kotlin, react-native, typescript
Domain
mobile

Research direction

Start by reproducing the issue with RN 0.87.1, New Architecture enabled, and the listed @react-native-firebase packages. Inspect the TurboModule registrations reported by npx react-native config and compare messaging() with the working app() module; MainApplication.kt and index.js are the native and JS entry points mentioned. Done means messaging() returns its JS module while app() and FCM delivery continue to work.

Written by the indexing model from the issue text.

Description

Needs Attention type: bug

Title: messaging() JS TurboModule returns undefined on RN 0.87.1 with New Architecture (app module works fine)

Versions

  • @react-native-firebase/app: 26.4.0
  • @react-native-firebase/messaging: 26.4.0
  • react-native: 0.87.1
  • newArchEnabled: true (mandatory on RN 0.87.1 — disabling it fails the build)
  • Platform: Android, physical device (Pixel 10 Pro)

Bug
import messaging from '@react-native-firebase/messaging'; typeof messaging() is undefined in JS at runtime, despite:

  • @react-native-firebase/app initializing successfully natively (confirmed via logcat: "FirebaseApp initialization successful", "ReactNativeFirebaseApp: received application context")
  • Correct Gradle plugin application (com.google.gms:google-services applied at bottom of app/build.gradle)
  • Autolinking correctly detecting the TurboModule libraries (npx react-native config shows RNFBAppTurboModules / RNFBMessagingTurboModules registered)
  • No manual native module registration needed/attempted beyond standard autolinking

The sibling app() core module works correctly; only the Messaging module's JS binding is undefined. This isolates the bug specifically to the messaging package's TurboModule registration under RN 0.87.1's New Architecture, not a general Firebase/New-Architecture incompatibility.

Workaround used to prove backend/FCM delivery works
Bypassing the JS layer entirely by calling FirebaseMessaging.getInstance().token.await() directly in native Kotlin (MainApplication.kt onCreate). This produces a valid FCM token and end-to-end delivery to the device is confirmed working via Firebase Admin SDK — so the issue is isolated to the JS binding, not Firebase/FCM itself.

Repro steps

  1. RN 0.87.1 project with New Architecture enabled (default/mandatory for this RN version)
  2. Install @react-native-firebase/[email protected] and @react-native-firebase/[email protected]
  3. Standard setup per docs (google-services.json, plugin applied, setBackgroundMessageHandler registered in index.js before AppRegistry.registerComponent)
  4. Call messaging() anywhere in JS after app mount → undefined

Happy to provide full logcat output, a minimal repro repo, or anything else needed.

Dominant language
TypeScript
Stars
12.3k
Forks
2.3k
Avg merge
3d 11h
Merged PRs (30d)
32

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from invertase/react-native-firebase

All issues in invertase/react-native-firebase

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.