-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Issue
Describe your issue here
I have been getting this issue
`
Task :app:checkReleaseAarMetadata FAILED
Task :app:createBundleReleaseJsAndAssets
WARN the transform cache was reset.
Welcome to Metro v0.81.4
Fast - Scalable - Integrated
WARN Watchman watch-project
returned a warning: Recrawled this watch 103 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
watchman watch-del '/Users/ghulamyazdani/posist/restroApp' ; watchman watch-project '/Users/ghulamyazdani/posist/restroApp'
WARN Watchman query
returned a warning: Recrawled this watch 103 times, most recently because:
MustScanSubDirs UserDroppedTo resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
watchman watch-del '/Users/ghulamyazdani/posist/restroApp' ; watchman watch-project '/Users/ghulamyazdani/posist/restroApp'
Recrawled this watch 103 times, most recently because:`
I have been working on fixing it with multiple things creating my own task like tasks.whenTaskAdded { task -> if (task.name == 'checkReleaseAarMetadata') { task.dependsOn(':@react-native-firebase_auth:writeReleaseAarMetadata') } }
but it doesn't work what could be the issue
Project Files
`def node_require(script)Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", dir]).strip
end
Use it to require both react-native's and this package's scripts:
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
platform :ios, min_ios_version_supported
prepare_react_native_project!
⬇️ uncomment the permissions you need
setup_permissions([
'AppTrackingTransparency',
'Bluetooth',
'Calendars',
'CalendarsWriteOnly',
'Camera',
'Contacts',
'FaceID',
'LocationAccuracy',
'LocationAlways',
'LocationWhenInUse',
'MediaLibrary',
'Microphone',
'Motion',
'Notifications',
'PhotoLibrary',
'PhotoLibraryAddOnly',
'Reminders',
'Siri',
'SpeechRecognition',
'StoreKit',
])
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'SkipQ' do
config = use_native_modules!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)
end
end`
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 34
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
classpath("com.google.gms:google-services:4.4.2")
}
}
apply plugin: "com.facebook.react.rootproject"
`
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: "com.google.gms.google-services"
/**
-
This is the configuration block to customize your React Native Android app.
-
By default you don't need to apply any configuration, just uncomment the lines you need.
/
react {
/ Folders */
// Configurations.../* Autolinking */
autolinkLibrariesWithApp()
}
// Use default .env file
project.ext.envConfigFiles = [
debug: ".env",
release: ".env"
]
// Apply react-native-config early to make env variables available to android build config
apply from: project.rootProject.file("../node_modules/react-native-config/android/dotenv.gradle")
/**
- Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
- The preferred build flavor of JavaScriptCore (JSC)
*/
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
namespace "com.skipq"
defaultConfig {
applicationId "com.skipq"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
packagingOptions {
pickFirst '**/androidx.localbroadcastmanager_localbroadcastmanager.version'
pickFirst '**/META-INF/androidx.*.version'
pickFirst '**/META-INF/com.android.support_*.version'
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}
configurations.all {
exclude group: 'com.android.support', module: 'support-compat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'animated-vector-drawable'
exclude group: 'com.android.support', module: 'support-vector-drawable'
exclude group: 'com.android.support', module: 'versionedparcelable'
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
// Add react-native-video here instead of at the top level
implementation project(':react-native-video')
// Firebase BOM
implementation platform('com.google.firebase:firebase-bom:33.7.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging'
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
tasks.whenTaskAdded { task ->
if (task.name == 'checkReleaseAarMetadata') {
task.dependsOn(':@react-native-firebase_auth:writeReleaseAarMetadata')
}
}
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
// This is already applied at the top of the file, so we can remove it here
// apply from: project.rootProject.file("../node_modules/react-native-config/android/dotenv.gradle")
`
. `xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<!-- Push Notifications -->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:supportsRtl="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
tools:replace="android:appComponentFactory">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Firebase Messaging Service -->
<service
android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
`
Javascript
Click To Expand
package.json
:
{
"name": "skipQ",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest",
"apk:prod": "cd android && ./gradlew clean && ./gradlew assemblerelease",
"remove_and_install": "rm -rf ios/Pods && rm -rf ios/build && cd ios && pod install && cd ../ && rm -rf node_modules && rm yarn.lock && yarn install",
"link-fonts": "npx react-native-asset",
"setup-fonts": "npx react-native-asset && cd ios && pod install && cd ..",
"reset-cache": "npx react-native start --reset-cache",
"build:android:testing": "cd android && ./gradlew clean && ./gradlew assembleDebug",
"build:android:staging": "cd android && ./gradlew clean && ./gradlew assembleRelease -PBUILD_VARIANT=staging",
"build:android:production": "cd android && ./gradlew clean && ./gradlew assembleRelease -PBUILD_VARIANT=production",
"build:android:bundle:testing": "cd android && ./gradlew clean && ./gradlew bundleDebug",
"build:android:bundle:staging": "cd android && ./gradlew clean && ./gradlew bundleRelease -PBUILD_VARIANT=staging",
"build:android:bundle:production": "cd android && ./gradlew clean && ./gradlew bundleRelease -PBUILD_VARIANT=production",
"build:ios:testing": "cd ios && xcodebuild -workspace restroApp.xcworkspace -scheme restroApp -configuration Debug -destination generic/platform=iOS -archivePath build/restroApp.xcarchive archive",
"build:ios:staging": "cd ios && xcodebuild -workspace restroApp.xcworkspace -scheme restroApp -configuration Release -destination generic/platform=iOS -archivePath build/restroApp-staging.xcarchive archive",
"build:ios:production": "cd ios && xcodebuild -workspace restroApp.xcworkspace -scheme restroApp -configuration Release -destination generic/platform=iOS -archivePath build/restroApp-production.xcarchive archive",
"build:ios:export:testing": "cd ios && xcodebuild -exportArchive -archivePath build/restroApp.xcarchive -exportPath build/ipa-testing -exportOptionsPlist exportOptions-testing.plist",
"build:ios:export:staging": "cd ios && xcodebuild -exportArchive -archivePath build/restroApp-staging.xcarchive -exportPath build/ipa-staging -exportOptionsPlist exportOptions-staging.plist",
"build:ios:export:production": "cd ios && xcodebuild -exportArchive -archivePath build/restroApp-production.xcarchive -exportPath build/ipa-production -exportOptionsPlist exportOptions-production.plist",
"clean:all": "rm -rf node_modules && rm -rf ios/build && rm -rf android/build && rm -rf android/app/build && rm yarn.lock && yarn install && cd ios && rm -rf Pods && pod install",
"clean:android": "cd android && ./gradlew clean && rm -rf build && rm -rf app/build",
"clean:ios": "cd ios && rm -rf build && rm -rf Pods && pod install",
"prebuild:android": "yarn install && cd android && ./gradlew clean",
"prebuild:ios": "yarn install && cd ios && pod install",
"test:build": "yarn test && yarn lint",
"dev:android": "react-native run-android",
"dev:ios": "react-native run-ios --mode=Debug",
"dev:android:device": "react-native run-android --mode=debug --deviceId",
"dev:ios:device": "react-native run-ios --mode=Debug --device",
"dev:android:release": "react-native run-android --mode=release",
"dev:ios:release": "react-native run-ios --mode=Release",
"start:dev": "react-native start",
"start:reset": "react-native start --reset-cache",
"logs:android": "react-native log-android",
"logs:ios": "react-native log-ios"
},
"dependencies": {
"@gorhom/bottom-sheet": "^5",
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-community/blur": "^4.4.1",
"@react-native-community/geolocation": "^3.4.0",
"@react-native-firebase/app": "^21.14.0",
"@react-native-firebase/auth": "^21.14.0",
"@react-native-firebase/messaging": "21.14.0",
"@react-native-voice/voice": "^3.2.4",
"@react-navigation/bottom-tabs": "^7.3.9",
"@react-navigation/native": "^7.0.14",
"@react-navigation/native-stack": "^7.2.0",
"@reduxjs/toolkit": "^2.6.0",
"@shopify/react-native-skia": "^1.11.8",
"env-cmd": "^10.1.0",
"firebase": "^12.0.0",
"geolib": "^3.3.4",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"react": "19.0.0",
"react-native": "0.78.0",
"react-native-config": "^1.5.5",
"react-native-dotenv": "^3.4.11",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.24.0",
"react-native-get-random-values": "^1.11.0",
"react-native-haptic-feedback": "^2.3.3",
"react-native-linear-gradient": "^2.8.3",
"react-native-permissions": "^5.2.6",
"react-native-push-notification": "^8.1.1",
"react-native-qrcode-svg": "^6.3.15",
"react-native-razorpay": "^2.3.0",
"react-native-reanimated": "^3.17.0",
"react-native-safe-area-context": "^5.2.0",
"react-native-screens": "^4.9.1",
"react-native-svg": "^15.11.2",
"react-native-vector-icons": "^10.2.0",
"react-native-video": "^6.10.2",
"react-redux": "^9.2.0",
"redux-persist": "^6.0.0",
"redux-persist-transform-filter": "^0.0.22"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "^15.1.3",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.78.0",
"@react-native/eslint-config": "0.78.0",
"@react-native/metro-config": "0.78.0",
"@react-native/typescript-config": "0.78.0",
"@types/jest": "^29.5.13",
"@types/react": "^19.0.0",
"@types/react-native-push-notification": "^8.1.4",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "^19.0.0",
"babel-plugin-module-resolver": "^5.0.2",
"eslint": "^8.19.0",
"install": "^0.13.0",
"jest": "^29.6.3",
"npm": "^11.1.0",
"prettier": "2.8.8",
"react-test-renderer": "19.0.0",
"reactotron-react-native": "^5.1.12",
"reactotron-redux": "^3.1.11",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}
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
- 👉 Check out
React Native Firebase
andInvertase
on Twitter for updates on the library.