An unexpected error has occurred while installing the Cordova plugins

Hi I'm building a mobile app that makes use of Firebase Cloud Message, i'm trying to generate the .apk file in order to register the app on Firebase, doing the generation I get the following error, An unexpected error has occurred while installing the Cordova plugins. When i look on the AndroidBuildLog. I see the following Errors :

Error: TypeError: Cannot read property 'find' of undefined
    at /opt/NativeBuilder/builds/c07f8cdc-50bc-4f41-99fc-2924f4672613/source/plugins/phonegap-plugin-push-outsystems/hooks/outsystems/copy_google_service_config.js:40:29
    at /usr/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:142:16
    at FSReqWrap.oncomplete (fs.js:82:15)

I've been trying to find both copy_google_service_config.js and graceful-fs.js without sucess in order to troubleshoot the problem. Without any sucess until now, does anyone know the problem im facing or has encountered it before?

Best Regards




I've found out what it was. FCM (Firebase Cloud Messaging) requires a configuration file, as said in the documentation:

"Hit “REGISTER APP” and save the provided “google-services.json” file. This file is used to configure the FirebaseCloudMessagePlugin in your application. See detailed information under “FirebaseCloudMessagePlugin Configurations” section."

You need the conf file in each eSpace that uses the FIrebase Cloud Messaging. Just because you have one Firebase Cloud Messaging Plugin does not make it work for every eSpace. Every eSpace that uses this plugin needs one. 

Note the last two fields are optional. You only need to register the application in Firebase, download the conf file, add it to each eSpace that uses the plugin, don't forget to follow the instructions in the documentation ( Deploy: Target Directory, etc ). Remember, eSpaces in the same application will also share the same conf file, but all of them need it in their resources.

And you should be set. Hope this helps. 

(PS: I'm on Fábio Santos' Team, I found out that it was my Fábio Santos after I wrote the +1. Just writing this so that everyone else who experiences this problem with Firebase Cloud Messaging can get over it. Good Luck )