Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

phonegap-plugin-push and firebase-analytics are not compatible together #2796

Closed
rphiller opened this issue Jul 26, 2019 · 9 comments · Fixed by #2817
Closed

phonegap-plugin-push and firebase-analytics are not compatible together #2796

rphiller opened this issue Jul 26, 2019 · 9 comments · Fixed by #2817

Comments

@rphiller
Copy link

Expected Behaviour

That you can install both together in same Project.

Actual Behaviour

Firstly both plugins depend on same plugin: "cordova-support-google-services"
"phonegap-plugin-push" needs "cordova-support-google-services@~1.1.0"
"firebase-analytics" needs "cordova-support-google-services@^1.3.0"

Secondly after installing one of them, no matter which, there comes this error (in my case on firebase)

Installing "cordova-plugin-firebase-analytics" for ios
Running command: pod install --verbose
Failed to install 'cordova-plugin-firebase-analytics': Error: pod: Command failed with exit code 1

Has anyone have done simiular expecience?

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

cordova-android: ^8.0.0
cordova-ios: ^5.0.1
cordova: 9.0.0

Plugin version

phonegap-plugin-push 2.2.3
cordova-plugin-firebase-analytics: 3.0.0

@ConnorMcGill
Copy link

I'm dealing with the exact same problem myself, any luck finding a solution?

@enzo-vezzaro-eleva
Copy link

please keep me posted. we need this fix urgent. thanks

@Greg4572
Copy link

Hey, i dont know if this will help you but i also had an issue where different plugins where installing different versions of "cordova-support-google-services" during the build process. I found these 3 plugins that "force" cordova-support-google-services onto a single version which solved my issue.

cordova-android-support-gradle-release
cordova-android-firebase-gradle-release
cordova-android-play-services-gradle-release

I hope this helps.

@enzo-vezzaro-eleva
Copy link

Hi guys, I tried the solution @Greg4572 proposed, but i couldn't get this plugins to work with Firebase. Do you guys have any news about this?

System Info:

Ionic:

ionic (Ionic CLI) : 4.12.0 (/Users/elevasrl/.nvm/versions/node/v11.9.0/lib/node_modules/ionic)
Ionic Framework : ionic1 1.3.4
@ionic/v1-toolkit : 1.0.22

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 36 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/elevasrl/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v11.9.0 (/Users/elevasrl/.nvm/versions/node/v11.9.0/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 11.0 Build version 11A420a

The output i get on building is this:

Task :app:compileDebugJavaWithJavac FAILED
/Users/elevasrl/Desktop/GITHUB/YachtNeeds-App/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.java:15: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
/Users/elevasrl/Desktop/GITHUB/YachtNeeds-App/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushPlugin.java:16: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
/Users/elevasrl/Desktop/GITHUB/YachtNeeds-App/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.java:26: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
/Users/elevasrl/Desktop/GITHUB/YachtNeeds-App/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.java:27: error: package android.support.v4.app.NotificationCompat does not exist
import android.support.v4.app.NotificationCompat.WearableExtender;
^
/Users/elevasrl/Desktop/GITHUB/YachtNeeds-App/platforms/android/app/src/main/java/com/adobe/phonegap/push/FCMService.java:28: error: cannot find symbol
import android.support.v4.app.RemoteInput;

...... MORE ......

Do you guys have any other solutions for this?

Thanks,

@Aggror
Copy link

Aggror commented Oct 23, 2019

@Greg4572 Would you mind sharing the config.xml part where your plugins/version/engine tags are listed? Thanks in advance.

@Greg4572
Copy link

@Aggror I have attached my config.xml in a text file as i cant seem to be able to post it as a comment. Sorry if it looks like a mess, but it works so i try not to mess with it to much. I hope this helps you in some way.
GithubComment.txt

@Aggror
Copy link

Aggror commented Oct 23, 2019

@Greg4572 First of: thank you for responding. That is always appreciated.
With your changes my app suddenly build, but unfortunately the window.FirebasePlugin remains null when starting my app. Still, no build errors is already an improvement.

@Greg4572
Copy link

@Aggror Great, I'm glad i could help out in some form. As for the window.FirebasePlugin issue you are experiencing, I haven't used the Firebase Plugin before so i cant help much with that. What i can suggest, is that if you are trying to access it on launch, make sure the device is ready before trying to call it. I hope you are able to find a solution for this.

@lock
Copy link

lock bot commented Nov 22, 2019

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

5 participants