React-native-firebase: REACT NATIVE Could not find com.google.firebase:firebase-iid:. after Tuesday update.

Created on 9 Jul 2020  路  9Comments  路  Source: invertase/react-native-firebase

Before the update we were running fine, the problem is, the team i am in, is new this is also a fairly small project, problem is even downgrading randomly trying to find the correct version did not help, and people don`t know what version we were running, im really lost here.

i do understanding this is not stackOverflow but, i really dont know where to go, as currently i am reading the firebase docs to see where and if i can help solve this.

  • the usage of sudo su is to prevent some bugs within our enviroment

    1 > [sudo su] yarn react-native start
    2 > [sudo su] yarn android:android:debug

which results in this error:

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.google.firebase:firebase-iid:.
     Required by:
         project :app > project :@react-native-firebase_iid

**import info :@react-native-firebase_iid received an update as of yesterday july/07/2020
so before that all was working

follows the package.json file

  "dependencies": {
    "@react-native-community/async-storage": "^1.6.1",
    "@react-native-community/netinfo": "^5.6.2",
    "@react-native-firebase/analytics": "^6.1.0",
    "@react-native-firebase/app": "^6.1.0", DOWNGRADING DID NOT HELP ( version bellow )
    "@react-native-firebase/iid": "^6.3.4", DOWNGRADING DID NOT HELP ( version bellow )
    "axios": "^0.19.0",
    "native-base": "^2.13.1",
    "prop-types": "^15.7.2",
    "react": "16.8.6",
    "react-native": "^0.60.4",
    "react-native-barcode-builder": "^1.0.5",
    "react-native-config": "^0.12.0",
    "react-native-dialog": "^5.6.0",
    "react-native-elements": "^1.2.0",
    "react-native-flip-card": "^3.5.5",
    "react-native-geolocation-service": "^3.1.0",
    "react-native-gesture-handler": "^1.3.0",
    "react-native-image-picker": "^1.1.0",
    "react-native-keychain": "^3.1.3",
    "react-native-map-link": "^2.5.1",
    "react-native-maps": "^0.25.0",
    "react-native-masked-text": "^1.13.0",
    "react-native-screens": "^2.3.0",
    "react-native-splash-screen": "^3.2.0",
    "react-native-touch-id": "^4.4.1",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^3.11.1",
    "uninstall": "0.0.0"
  },

yarn list --pattern "@react-native-firebase" results in

yarn list v1.22.4
鈹溾攢 @react-native-firebase/[email protected]
鈹溾攢 @react-native-firebase/[email protected]
鈹溾攢 @react-native-firebase/[email protected]
鈹斺攢 @react-native-firebase/[email protected]
Done in 0.49s.

Following another questions similar to this problem gave me these options

rm -rf node_modules/
rm -rf yarn.lock
./gradlew clean
yarn react-native link react-native-firebase
yarn react-native start --reset-cache
tryng to sync the android project on android studio
IOS also having problems
following the iid instalation to react native from firebase

none worked, sadly

yarn react-native link react-native-firebase results in

yarn run v1.22.4 $ /home/raiadrogasil.com/kamoraes/Workspace/ProjetosRd/univers-app-react/node_modules/.bin/react-native link react-native-firebase warn The following packages use deprecated "rnpm" config that will stop working from next release: - react-native-maps: https://npmjs.com/package/react-native-maps Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide. error Unknown dependency. Make sure that the package you are trying to link is already installed in your "node_modules" and present in your "package.json" dependencies. Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

**settings.gradle**

rootProject.name = 'universAppReact'
include ':react-native-touch-id'
project(':react-native-touch-id').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-touch-id/android')
include ':react-native-gesture-handler'
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gesture-handler/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':@react-native-firebase_app'
project(':@react-native-firebase_app').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/app/android')
include ':app'
build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
    buildToolsVersion = "28.0.3"
    minSdkVersion = 16
    compileSdkVersion = 28
    targetSdkVersion = 28
    supportLibVersion = "28.0.0"
    }
    repositories {
    google()
    jcenter()
    }
    dependencies {
    classpath("com.android.tools.build:gradle:3.4.1")
    classpath 'com.google.gms:google-services:4.3.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
    mavenLocal()
    maven {
        // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
        url("$rootDir/../node_modules/react-native/android")
    }
    maven {
        // Android JSC is installed from npm
        url("$rootDir/../node_modules/jsc-android/dist")
    }

    google()
    jcenter()
    }
}

```

the project stopped working after we tried a new clone, of the project ro resolve some issues.
please if there are needed any more info, do tell me.

Firebase Support Build Error Android

Most helpful comment

If you edit node_modules/@react-native-firebase/android/build.gradle and change the implementation line to have

   implementation "com.google.firebase:firebase-iid:20.2.1"

That would match the 25.5.0 BOM that is set currently

If you bump to current stable firebase-android-sdk BOM (as of this typing) which is 25.6.0 you would specify iid 20.2.3 as the version. Then it will compile

With use of https://github.com/ds300/patch-package you can then say cd android && ./gradlew clean && cd .. && npx patch-package @react-native-firebase/iid to generate a persistent patch that will maintain the fix will we figure things out

All 9 comments

Update to the absolute most current stable versions. Make no attempts to troubleshoot old versions please, we will all be chasing phantom issues that are resolved already.

IID is available, I use it extensively

Waving off sudo usage with "bugs within our environment" is insane to me :sweat_smile: ! Be careful there...

See if you can reproduce it with https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh - it uses iid https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh#L65

Update to the absolute most current stable versions. Make no attempts to troubleshoot old versions please, we will all be chasing phantom issues that are resolved already.

IID is available, I use it extensively

Waving off sudo usage with "bugs within our environment" is insane to me sweat_smile ! Be careful there...

See if you can reproduce it with https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh - it uses iid https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh#L65

thank you, about the sudo, yes i also find insanely weird, but for instance trying to install a package in global mode, only works in sudo su, not in sudo to wich i don't know why, the other two people that entered the company at the same time, in the same squad, with the notebooks tweaked by the same person are having literally the same issue, i don't have access to some places in this notebook, and neither will try as it is company goods.

But thanks, will try here!

I am experiencing this now, I believe I located the upstream issue - iid is not in the BOM which means we need to specify the version directly, unfortunately, until some other resolution method is found or upstream puts it back in the BOM https://github.com/firebase/firebase-android-sdk/issues/1077

If you edit node_modules/@react-native-firebase/android/build.gradle and change the implementation line to have

   implementation "com.google.firebase:firebase-iid:20.2.1"

That would match the 25.5.0 BOM that is set currently

If you bump to current stable firebase-android-sdk BOM (as of this typing) which is 25.6.0 you would specify iid 20.2.3 as the version. Then it will compile

With use of https://github.com/ds300/patch-package you can then say cd android && ./gradlew clean && cd .. && npx patch-package @react-native-firebase/iid to generate a persistent patch that will maintain the fix will we figure things out

Hello 馃憢, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?

This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.

I'm still pursuing this upstream

Of note the upstream version is 20.2.4 as of this typing, I'll propose a PR that works around this until upstream is resolved

My work around will be in the next release after this comment

Was this page helpful?
0 / 5 - 0 ratings