phonegap/phonegap-plugin-push

Failed to install 'phonegap-plugin-push': CordovaError: Version of installed plugin: "cordova-support-google-services@1.3.1"

Opened this issue · 5 comments

when i try to add android platform i am getting error


Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
          
Installing "cordova-support-google-services" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "phonegap-plugin-push" for android
Failed to install 'phonegap-plugin-push': CordovaError: Version of installed plugin: "cordova-support-google-services@1.3.1" does not satisfy dependency plugin requirement "cordova-support-google-services@~1.1.0". Try --force to use installed plugin as dependency.
    at /Users/bhuminbhandari/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:544:43
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Version of installed plugin: "cordova-support-google-services@1.3.1" does not satisfy dependency plugin requirement "cordova-support-google-services@~1.1.0". Try --force to use installed plugin as dependency.


i am using 2.2.3 version

Ionic:

Ionic CLI : 6.3.0 (/Users/bhuminbhandari/.npm-global/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.803.25
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 12 other plugins)

Utility:

cordova-res : 0.10.0
native-run : not installed

System:

NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : macOS Mojave

@bhandaribhumin have you found a solution? I have the same problem....

@masscube nope bro If you get something please let me know, but my iOS build works so I'm testing on iOS device as of now.

i got the same issue... and i´m not really sure if i solved it properly, but as a workaround you could try the following:

  • remove the platfom (ionic cordova platform remove android)
  • install the plugin (ionic cordova plugin add phonegap-plugin-push). This will add the plugin into the plugin folder under the root project path.
  • modify the plugin.xml with the required version for the cordova-support-google-services ()
  • install the platform (ionic cordova platform add android)

I have the same issues, push notifications don't work on Android when I install cordova-support-google-services 1.3.1, only 1.1.0.

But with cordova-support-google-services 1.1.0 we can't install push plugin version 2.3.0. Which we need for iOS 13, since with 2.2.x it returns an incorrect payload when getting the registration id.

So push notifications now either work for Android or iOS but not both.

@ryandegruyter AGREED.
but i found the solution.
step1: remove platform android (ionic cordova platform rm android)
step2: remove push plugin
step3: add google service cordova plugin add cordova-support-google-services@~1.3.1 --force
syep4: install push plugin