arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1k stars 1.55k forks source link

Ionic 4 : Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package name 'com.ionic.personalhealthassistant' #1093

Closed Nikhil-Daffodil closed 4 years ago

Nikhil-Daffodil commented 4 years ago

Whenever I try to make android build I always get this error:

Execution failed for task ':app:processDebugGoogleServices'.

No matching client found for package name 'com.ionic.personalhealthassistant'

I have placed my google-services.json file in platforms->android and platforms->android->app but whenever I try to my android build it automatically my google-services.json configuration to any other configuration thus my package_name also get changed. Package name change from com.ionic.personalhealthassistant to com.github.cordova_plugin_firebase

I have to remove the android platform and cordova-plugin-firebase and reinstall them but same error is occurring.

Autogenerating google-services.json

"client_info": { "mobilesdk_app_id": "1:123:android:123", "android_client_info": { "package_name": "com.github.cordova_plugin_firebase" } }, My original google-services.json

"client_info": { "mobilesdk_app_id": "1:794988011253:android:171bd43c7914d93d", "android_client_info": { "package_name": "com.ionic.personalhealthassistant" } },

bhavin9695 commented 4 years ago

I am also facing same issue. have you fixed it ?

Nikhil-Daffodil commented 4 years ago

No, not found the solution for this, so uninstall firebase plugin for now. Will do it later

bhavin9695 commented 4 years ago

ok. thanks

webprofusion-chrisc commented 4 years ago

I'm seeing the same problem (ionic/cordova). During build the process overwrites the google-services.json with the default causing a the wrong client id to be set, presume this is some sort of build hook issue.

victorpacheco3107 commented 4 years ago

Try this, work for me:

  1. ionic cordova platform rm android
  2. Copy the correct google-services.json in your project's root folder
  3. ionic cordova platform add android

Happy coding!

webprofusion-chrisc commented 4 years ago

@victorpacheco3107 thanks, the overall fix was to migrate to https://www.npmjs.com/package/cordova-plugin-firebasex as this project is clearly no longer maintained.

bhavin9695 commented 4 years ago

i solved it : it happens when you use multiple google services. check this link https://github.com/admob-plus/admob-plus/issues/115#issuecomment-518762726

tarunmishra592 commented 4 years ago

Can anyone help me I don't understand what will be the compatibility I am trying last 2 days

project.properties target=android-27 android.library.reference.1=CordovaLib android.library.reference.2=app cordova.system.library.1=com.google.android.gms:play-services-auth:11.8.0 cordova.system.library.2=com.google.android.gms:play-services-identity:11.8.0 cordova.gradle.include.1=phonegap-plugin-barcodescanner/retailordering-barcodescanner.gradle cordova.system.library.3=com.android.support:support-v4:27.+ cordova.system.library.4=com.facebook.android:facebook-android-sdk:4.+ cordova.system.library.5=com.android.support:support-v4:27.+ cordova.gradle.include.2=cordova-support-google-services/retailordering-build.gradle cordova.system.library.8=com.google.firebase:firebase-core:10.+ cordova.system.library.9=com.google.firebase:firebase-messaging:10.+ cordova.gradle.include.3=cordova-plugin-fcm-with-dependency-updated-apns/retailordering-FCMPlugin.gradle

getting error Execution failed for task ':app:processDebugGoogleServices'.

Nikhil-Daffodil commented 4 years ago

@victorpacheco3107 your suggestions work for me

JaballiAymen commented 3 years ago

check your name package in config.xml same name in package firebase