messaging() JS TurboModule returns undefined on RN 0.87.1 with New Architecture (app module works fine)"
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
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
- RN 0.87.1 project with New Architecture enabled (default/mandatory for this RN version)
- Install @react-native-firebase/[email protected] and @react-native-firebase/[email protected]
- Standard setup per docs (google-services.json, plugin applied, setBackgroundMessageHandler registered in index.js before AppRegistry.registerComponent)
- 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from invertase/react-native-firebase
-
Needs Attention type: bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
invertase/react-native-firebase#9354 · 1 comment ·
Maintainers usually reply within 1 day
-
platform: android platform: javascript plugin: database type: bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
invertase/react-native-firebase#9344 · 1 comment ·
Maintainers usually reply within 1 day
-
platform: ios plugin: database type: bug
Difficulty 3/5 1-2 days Newbie friendliness 78/100
invertase/react-native-firebase#9339 · 3 comments ·
Maintainers usually reply within 1 day
-
blocked: customer-response platform: android plugin: app-check Stale type: bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
invertase/react-native-firebase#9227 · 7 comments ·
Maintainers usually reply within 1 day
-
blocked: firebase-sdk Keep Open plugin: analytics type: bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
invertase/react-native-firebase#9115 · 3 comments ·
Maintainers usually reply within 1 day
All issues in invertase/react-native-firebase
Similar issues
-
area/core status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
google-gemini/gemini-cli#29602 ·
Maintainers usually reply within 1 day
-
area: backend enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
snapotter-hq/SnapOtter#1879 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Tencent/BrowserSkill#390 ·
Maintainers usually reply within 1 day
-
good first issue status: needs triaging type: bug version: 2.0
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
medusajs/medusa#17094 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day