Cordova-plugin-firebasex: After recent release from firebase, build is failing since 16th Jan 2020

Created on 16 Jan 2020  路  4Comments  路  Source: dpa99c/cordova-plugin-firebasex

Bug report

Current behavior:

[ERROR] An error occurred while running cordova build android (exit code 1):

    (truncated) ... with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':app:preDebugBuild'.
    > In project 'app' a resolved Google Play services library dependency depends on another at an exact version 
    (e.g. "[19.0.
       1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

       Dependency failing: com.google.firebase:firebase-messaging:19.0.1 -> 
    com.google.firebase:firebase-iid@[19.0.1], but fire
       base-iid version was 20.0.2.

       The following dependencies are project dependencies that are direct or have transitive dependencies that lead 
    to the art
       ifact with the issue.
       -- Project 'app' depends onto com.google.android.gms:play-services-tagmanager@17.+
       -- Project 'app' depends onto com.google.firebase:firebase-messaging@19.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.android.gms:[email protected]
       -- Project 'app' depends onto com.google.android.gms:[email protected]
       -- Project 'app' depends onto com.google.firebase:firebase-perf@18.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:firebase-core@17.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:firebase-config@18.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.android.gms:[email protected]
       -- Project 'app' depends onto com.google.firebase:[email protected]

       For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to 
    see the dep
       endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues 
    at https://
       github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false 
    }" to your b
       uild.gradle file.

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
    Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 26s
    /home/developer16/Desktop/Football/BuildTesting/Game11-APP/platforms/android/gradlew: Command failed with exit 
    code 1 Error output:
    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':app:preDebugBuild'.
    > In project 'app' a resolved Google Play services library dependency depends on another at an exact version 
    (e.g. "[19.0.
       1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

       Dependency failing: com.google.firebase:firebase-messaging:19.0.1 -> 
    com.google.firebase:firebase-iid@[19.0.1], but fire
       base-iid version was 20.0.2.

       The following dependencies are project dependencies that are direct or have transitive dependencies that lead 
    to the art
       ifact with the issue.
       -- Project 'app' depends onto com.google.android.gms:play-services-tagmanager@17.+
       -- Project 'app' depends onto com.google.firebase:firebase-messaging@19.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.android.gms:[email protected]
       -- Project 'app' depends onto com.google.android.gms:[email protected]
       -- Project 'app' depends onto com.google.firebase:firebase-perf@18.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:firebase-core@17.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:firebase-config@18.+
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.firebase:[email protected]
       -- Project 'app' depends onto com.google.android.gms:[email protected]
       -- Project 'app' depends onto com.google.firebase:[email protected]

       For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to 
    see the dep
       endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues 
    at https://
       github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false 
    }" to your b
       uild.gradle file.

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 
    Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 26s

Expected behavior:

Successful Build

Environment information
cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 8.1.2 ([email protected])

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : android 8.0.0 browser 5.0.4 ios 4.5.5
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v10.18.0
npm               : 6.13.4 
OS                : Linux 4.15
android build issue support

Most helpful comment

@dpa99c Hi Dave, In the last firebase release with help of your documentation i was able to fix the issue. Could you please guide me in this case as well.
Thanks in advance

Hi! I had the same problem and reinstalled firebaseX setting the most recent firebase-messaging-version (firebase android release notes)
$ cordova plugin add cordova-plugin-firebasex --variable ANDROID_FIREBASE_MESSAGING_VERSION=20.1.0

For my case it worked, subscribe and receive push

All 4 comments

@dpa99c Hi Dave, In the last firebase release with help of your documentation i was able to fix the issue. Could you please guide me in this case as well.
Thanks in advance

Looks like you have another plugin in your project which is adding com.google.firebase:firebase-messaging@19.+
This is colliding with the pinned version added by this plugin: com.google.firebase:[email protected]

While this plugin allows you to use plugin variables to override the default specified versions, e.g. --variable ANDROID_FIREBASE_MESSAGING_VERSION=19.+, in this that won't help as 19.+ will pull in a version incompatible with com.google.firebase:[email protected] which is also being pulled in by another plugin in your project.

You need to track down which plugins in your project are adding these additional Gradle dependencies. If they support using plugin variables to specify custom versions, use these to align the versions with those specified by this plugin. If they don't, raise an issue against that plugin to add support; you'll then need to fork the plugin to change the version manually in that plugin's plugin.xml.

Closing as this issue is not caused by this plugin but by conflicts with other plugins and therefore there are no changes that could be made to this plugin to resolve this.

@dpa99c Hi Dave, In the last firebase release with help of your documentation i was able to fix the issue. Could you please guide me in this case as well.
Thanks in advance

Hi! I had the same problem and reinstalled firebaseX setting the most recent firebase-messaging-version (firebase android release notes)
$ cordova plugin add cordova-plugin-firebasex --variable ANDROID_FIREBASE_MESSAGING_VERSION=20.1.0

For my case it worked, subscribe and receive push

Hello everyone, if you have installed cordova plugin add cordova-plugin-firebase-lib remove it first.
As a complement to @ danconte72 also add an additional plugin:

cordova plugin add cordova-plugin-enable-multidex

This worked for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zmoshansky picture zmoshansky  路  6Comments

luboslav picture luboslav  路  6Comments

Akz47 picture Akz47  路  6Comments

tux240 picture tux240  路  3Comments

DavidStrausz picture DavidStrausz  路  3Comments