{
"name": "up",
"version": "3.5.2",
"private": true,
"scripts": {
"emulator": "emulator @API_29",
"start": "npx react-native start",
"android": "npx react-native run-android",
"test": "jest",
"lint": "eslint .",
"metro": "adb reverse tcp:8081 tcp:8081 && npm start",
"metro-rc": "adb reverse tcp:8081 tcp:8081 && npm start -- --reset-cache",
"clean": "cd android && gradlew clean && cd ..",
"postinstall": "patch-package"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.15.6",
"@react-native-firebase/app": "^12.6.0",
"@react-native-firebase/firestore": "^12.6.0",
"@react-navigation/bottom-tabs": "^6.0.4",
"@react-navigation/native": "^6.0.2",
"@react-navigation/native-stack": "^6.0.5",
"@reduxjs/toolkit": "^1.5.1",
"@sentry/react-native": "^2.6.2",
"dayjs": "^1.10.5",
"react": "17.0.2",
"react-native": "0.65.0",
"react-native-fast-image": "^8.3.7",
"react-native-gesture-handler": "^1.10.3",
"react-native-safe-area-context": "^3.3.0",
"react-native-screens": "^3.5.0",
"react-native-vector-icons": "^8.1.0",
"react-redux": "^7.2.4"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/runtime": "^7.14.6",
"@react-native-community/eslint-config": "^2.0.0",
"@types/jest": "^26.0.19",
"@types/react": "^17.0.18",
"@types/react-native": "^0.64.13",
"@types/react-native-vector-icons": "^6.4.6",
"@types/react-redux": "^7.1.16",
"@types/react-test-renderer": "^17.0.1",
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"patch-package": "^6.4.7",
"prettier": "2.3.1",
"react-native-clean-project": "^3.6.3",
"react-native-codegen": "^0.0.7",
"react-native-flipper": "^0.102.0",
"react-test-renderer": "17.0.2",
"redux-flipper": "^2.0.0",
"typescript": "^4.3.2",
"use-reducer-logger": "^1.0.2"
},
"jest": {
"preset": "react-native"
}
}
Issue
Hello, the react-native 0.65.0 is showing a warning because of this library with the message: "
new NativeEventEmitter()was called with a non-null argument without the requiredaddListener/removeListenersmethod."This warning is shown because of the commit 114be1d, which checks if the native module
RNFBAppModulehas the methods:addListenerandremoveListeners. These checks are necessary because of this commit f5502fb, which tries to use the native module to notify subscriptions on Android. So I think this issue is only related to Android.Looking at the iOS code I noticed these methods:
and since the
RNFBAppModuleuses only the methods:eventsAddListenerandeventsRemoveListener, I put the required methods in the Android module like the iOS code and it works:Project Files
Javascript
Click To Expand
package.json:{ "name": "up", "version": "3.5.2", "private": true, "scripts": { "emulator": "emulator @API_29", "start": "npx react-native start", "android": "npx react-native run-android", "test": "jest", "lint": "eslint .", "metro": "adb reverse tcp:8081 tcp:8081 && npm start", "metro-rc": "adb reverse tcp:8081 tcp:8081 && npm start -- --reset-cache", "clean": "cd android && gradlew clean && cd ..", "postinstall": "patch-package" }, "dependencies": { "@react-native-async-storage/async-storage": "^1.15.6", "@react-native-firebase/app": "^12.6.0", "@react-native-firebase/firestore": "^12.6.0", "@react-navigation/bottom-tabs": "^6.0.4", "@react-navigation/native": "^6.0.2", "@react-navigation/native-stack": "^6.0.5", "@reduxjs/toolkit": "^1.5.1", "@sentry/react-native": "^2.6.2", "dayjs": "^1.10.5", "react": "17.0.2", "react-native": "0.65.0", "react-native-fast-image": "^8.3.7", "react-native-gesture-handler": "^1.10.3", "react-native-safe-area-context": "^3.3.0", "react-native-screens": "^3.5.0", "react-native-vector-icons": "^8.1.0", "react-redux": "^7.2.4" }, "devDependencies": { "@babel/core": "^7.14.6", "@babel/runtime": "^7.14.6", "@react-native-community/eslint-config": "^2.0.0", "@types/jest": "^26.0.19", "@types/react": "^17.0.18", "@types/react-native": "^0.64.13", "@types/react-native-vector-icons": "^6.4.6", "@types/react-redux": "^7.1.16", "@types/react-test-renderer": "^17.0.1", "babel-jest": "^26.6.3", "babel-plugin-module-resolver": "^4.1.0", "babel-plugin-transform-remove-console": "^6.9.4", "eslint": "7.32.0", "jest": "^26.6.3", "metro-react-native-babel-preset": "^0.66.2", "patch-package": "^6.4.7", "prettier": "2.3.1", "react-native-clean-project": "^3.6.3", "react-native-codegen": "^0.0.7", "react-native-flipper": "^0.102.0", "react-test-renderer": "17.0.2", "redux-flipper": "^2.0.0", "typescript": "^4.3.2", "use-reducer-logger": "^1.0.2" }, "jest": { "preset": "react-native" } }firebase.jsonfor react-native-firebase v6:# N/AiOS
Click To Expand
ios/Podfile:# N/AAppDelegate.m:// N/AAndroid
Click To Expand
Have you converted to AndroidX?
android/gradle.settingsjetifier=truefor Android compatibility?jetifierfor react-native compatibility?android/build.gradle:android/app/build.gradle:android/settings.gradle:MainApplication.java:// N/AAndroidManifest.xml:<!-- N/A -->Environment
Click To Expand
react-native infooutput:react-native-firebaseversion you're using that has this issue:12.6.0Firebasemodule(s) you're using that has the issue:appTypeScript?Y&4.3.2This is my first contribution to open-source, so I hope I helped.