Skip to content
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

[🐛] RNFBAppModule not found when migrating to newest RNFB version [EXPO] #8452

Open
1 of 10 tasks
cw1997 opened this issue Apr 7, 2025 · 4 comments
Open
1 of 10 tasks

Comments

@cw1997
Copy link

cw1997 commented Apr 7, 2025

Issue

After I upgrading all packages @react-native-firebase/* from 19.0.0 to 21.13.0 in my APP, which built with Expo SDK v52,

Image

I have tried to run npx expo prebuild --clean then launch my APP on Expo Go via command npx expo start --go --clear, then it reports the error as the screenshot at below

(NOBRIDGE) ERROR Error: Native module RNFBAppModule not found. Re-check module install, linking, configuration, build and install steps.

Image

How could I fix the error?
And is there any a better way that the native modules like packages @react-native-firebase/* are disabled automatically while I launch my app on Expo Go and enables them automatically on build(also enable them on releases verison)?

Thank you very much!


Project Files

Javascript

Click To Expand

package.json:

{
  "name": "*",
  "version": "*,
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "postinstall": "npm run gen:license-json",
    "start:go": "npx expo start --go --clear",
    "android": "npx expo start --android",
    "ios": "npx expo start --ios",
    "web": "npx expo start --web",
    "eject": "npx expo eject",
    "test": "jest --watchAll",
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@ant-design/react-native": "5.2.3",
    "@expo/config-plugins": "~9.0.0",
    "@expo/metro-config": "~0.19.0",
    "@expo/vector-icons": "^14.0.4",
    "@kichiyaki/react-native-barcode-generator": "0.6.7",
    "@nandorojo/swr-react-native": "2.0.0",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-community/netinfo": "11.4.1",
    "@react-native-firebase/analytics": "19.0.0",
    "@react-native-firebase/app": "19.0.0",
    "@react-native-firebase/crashlytics": "19.0.0",
    "@react-native-firebase/perf": "19.0.0",
    "@react-native-picker/picker": "2.9.0",
    "@react-navigation/bottom-tabs": "6.6.1",
    "@react-navigation/native": "6.1.18",
    "@react-navigation/native-stack": "6.11.0",
    "@sentry/react-native": "~6.3.0",
    "axios": "1.7.7",
    "dayjs": "1.11.13",
    "expo": "^52.0.0",
    "expo-application": "~6.0.2",
    "expo-asset": "~11.0.5",
    "expo-brightness": "~13.0.3",
    "expo-build-properties": "~0.13.2",
    "expo-camera": "~16.0.18",
    "expo-clipboard": "~7.0.1",
    "expo-constants": "~17.0.8",
    "expo-dev-client": "~5.0.19",
    "expo-device": "~7.0.3",
    "expo-file-system": "~18.0.12",
    "expo-font": "~13.0.4",
    "expo-image-picker": "~16.0.6",
    "expo-insights": "~0.8.2",
    "expo-linking": "~7.0.5",
    "expo-mail-composer": "~14.0.2",
    "expo-media-library": "~17.0.6",
    "expo-screen-capture": "~7.0.1",
    "expo-splash-screen": "~0.29.22",
    "expo-status-bar": "~2.0.1",
    "expo-store-review": "~8.0.1",
    "expo-system-ui": "~4.0.9",
    "expo-updates": "~0.27.4",
    "i18next": "23.15.1",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-i18next": "14.0.5",
    "react-native": "0.76.9",
    "react-native-calendars": "1.1307.0",
    "react-native-chart-kit": "6.12.0",
    "react-native-dotenv": "3.4.11",
    "react-native-paper": "5.12.5",
    "react-native-qrcode-svg": "6.3.2",
    "react-native-render-html": "6.3.4",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.4.0",
    "react-native-svg": "15.8.0",
    "react-native-svg-transformer": "~1.5.0",
    "react-native-table-component": "1.2.2",
    "react-native-web": "~0.19.13",
    "react-native-webview": "13.12.5",
    "sentry-expo": "~7.0.0",
    "swr": "2.2.5"
  },
  "devDependencies": {
    "@babel/core": "^7.25.7",
    "@types/jest": "29.5.13",
    "@types/node": "^20",
    "@types/react": "~18.3.12",
    "@types/react-native-table-component": "1.2.8",
    "babel-plugin-import": "1.13.8",
    "babel-plugin-module-resolver": "5.0.2",
    "jest": "^29.7.0",
    "jest-expo": "~52.0.6",
    "react-test-renderer": "18.3.1",
    "typescript": "~5.3.3"
  },
  "engines": {
    "node": "^20.18.0",
    "npm": "^10.8.2"
  },
  "private": true
}

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • e.g. 5.4.3
  • Firebase module(s) you're using that has the issue:
    • e.g. Instance ID
  • Are you using TypeScript?
    • Y/N & VERSION


@MichaelVerdon MichaelVerdon changed the title [🐛] Bug Report Title - CHANGE ME [🐛] RNFBAppModule not found when migrating to newest RNFB version [EXPO] Apr 7, 2025
@OgDev-01
Copy link

OgDev-01 commented Apr 7, 2025

Hey @cw1997, You will need to provide more information so you can get assistance quickly:

  • The list of services you use
  • The content of your app.json (or app.config.ts if you use dynamic config)

Between, Did you add the firebase config plugins to your expo plugin list?

@MichaelVerdon
Copy link
Collaborator

MichaelVerdon commented Apr 7, 2025

Im assuming it worked before the migration? I would discourage you from building a Firebase application on Expo but I would recommend checking out this guide using React Native Firebase with Expo: https://docs.expo.dev/guides/using-firebase/#install-and-initialize-react-native-firebase If you are using iOS I would also recommend updating your Podfile. Make sure you are using a development build aswell as Expo Go does not use native code. https://rnfirebase.io/#installation-for-expo-projects Let me know how it goes. 😄

@OgDev-01
Copy link

OgDev-01 commented Apr 7, 2025

I would discourage you from building a Firebase application on Expo

Curious why you would discourage using expo? Is there something we are missing? 👀

@mikehardy
Copy link
Collaborator

Expo should work if you follow the guide - I suggest you try a clean start - just as a toy to reproduce - and see what happens with the most current versions of react-native-firebase and Expo, and the minimal app.json stuff based on our guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants