[Firebase Cloud Message Plugin] Failed building native Android app: why pushwoosh mentioned in error log?

Forge Component
(6)
Published on 18 Jul by Experts
6 votes
Published on 18 Jul by Experts

I used personal environment with MABS 5.

Here's the error:

[2019-08-01T04:18:27.342Z] [INFO] Start processing job request...
[2019-08-01T04:18:27.345Z] [INFO] Start generating application...
[2019-08-01T04:18:27.345Z] [INFO] Template version: 5.1.3
[2019-08-01T04:18:27.345Z] [INFO] Build features: cordovaNoFetch - true
[2019-08-01T04:18:27.345Z] [INFO] Build features: buildTimeout - 20
[2019-08-01T04:18:27.345Z] [INFO] Creating a temporary folder for the application...
[2019-08-01T04:18:27.345Z] [INFO] Creating the required directory structure for your cordova application...
[2019-08-01T04:18:30.733Z] [INFO] Getting application resources...
[2019-08-01T04:18:30.739Z] [INFO] Processing application resources...
[2019-08-01T04:18:30.831Z] [INFO] Generating application assets...
[2019-08-01T04:18:31.091Z] [INFO] Applying configurations in the config.xml file...
[2019-08-01T04:18:31.102Z] [INFO] Applying advanced configurations in the config.xml file...
[2019-08-01T04:18:31.102Z] [INFO] Applying custom application icons...
[2019-08-01T04:18:31.102Z] [INFO] Applying custom application splashscreens...
[2019-08-01T04:18:31.102Z] [INFO] Applying application preferences...
[2019-08-01T04:18:31.103Z] [INFO] Applying application accessList...
[2019-08-01T04:18:31.103Z] [INFO] Adding target platform...
[2019-08-01T04:19:00.956Z] [INFO] Applying plugins in the config.xml file...
[2019-08-01T04:19:00.956Z] [INFO] Plugin Id: https://github.com/OutSystemsExperts/outsystems-phonegap-plugin-push.git#2.2.3-os1
[2019-08-01T04:19:00.956Z] [INFO] Plugin Action: add
[2019-08-01T04:19:05.835Z] [ERROR] No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "https://github.com/OutSystemsExperts/outsystems-phonegap-plugin-push.git#2.2.3-os1"
Fetching plugin "https://github.com/OutSystemsExperts/outsystems-phonegap-plugin-push.git" via git clone
Running command: git clone https://github.com/OutSystemsExperts/outsystems-phonegap-plugin-push.git /tmp/git/1564633141785
Command finished with error code 0: git clone,https://github.com/OutSystemsExperts/outsystems-phonegap-plugin-push.git,/tmp/git/1564633141785
Running command: git checkout 2.2.3-os1
Command finished with error code 0: git checkout,2.2.3-os1
Repository "https://github.com/OutSystemsExperts/outsystems-phonegap-plugin-push.git" checked out to git ref "2.2.3-os1".
/tmp/build/source/plugins/phonegap-plugin-push"...
Plugin "phonegap-plugin-push" fetched.
Calling plugman.install on plugin "/opt/NativeBuilder/builds/19a8280e-fb59-4888-abe3-72f22aa9550a/source/plugins/phonegap-plugin-push" for platform "android
Installing "phonegap-plugin-push" for android
Running command: /opt/NativeBuilder/builds/19a8280e-fb59-4888-abe3-72f22aa9550a/source/platforms/android/cordova/version
Command finished with error code 0: /opt/NativeBuilder/builds/19a8280e-fb59-4888-abe3-72f22aa9550a/source/platforms/android/cordova/version
Dependencies detected, iterating through them...
Requesting plugin "cordova-support-google-services@~1.2.0".
Plugin dependency "cordova-support-google-services" not fetched, retrieving then installing.
Fetching plugin "cordova-support-google-services@~1.2.0" via npm
Copying plugin "/opt/.cordova/lib/npm_cache/cordova-support-google-services/1.2.1/package" => "/opt/NativeBuilder/builds/19a8280e-fb59-4888-abe3-72f22aa9550a/source/plugins/cordova-support-google-services"
Installing "cordova-support-google-services" for android
Finding scripts for "before_plugin_install" hook from plugin cordova-support-google-services on android platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-support-google-services" on android.
PlatformApi successfully found for platform android
Beginning processing of action stack for android project...
Installing Android library: build.gradle
Action stack processing complete.
Updating build files since android plugin contained <framework>
Subproject Path: CordovaLib
Subproject Path: app
Install complete for cordova-support-google-services on android.
Finding scripts for "after_plugin_install" hook from plugin cordova-support-google-services on android platform only.
No scripts found for hook "after_plugin_install".
Requesting plugin "phonegap-plugin-multidex@~1.0.0".
Plugin dependency "phonegap-plugin-multidex" not fetched, retrieving then installing.
Fetching plugin "phonegap-plugin-multidex@~1.0.0" via npm
Copying plugin "/opt/.cordova/lib/npm_cache/phonegap-plugin-multidex/1.0.0/package" => "/opt/NativeBuilder/builds/19a8280e-fb59-4888-abe3-72f22aa9550a/source/plugins/phonegap-plugin-multidex"
Installing "phonegap-plugin-multidex" for android
Finding scripts for "before_plugin_install" hook from plugin phonegap-plugin-multidex on android platform only.
No scripts found for hook "before_plugin_install".
Install start for "phonegap-plugin-multidex" on android.
Beginning processing of action stack for android project...
Installing Android library: multidex.gradle
Action stack processing complete.
Updating build files since android plugin contained <framework>
Subproject Path: CordovaLib
Subproject Path: app
Install complete for phonegap-plugin-multidex on android.
Finding scripts for "after_plugin_install" hook from plugin phonegap-plugin-multidex on android platform only.
No scripts found for hook "after_plugin_install".
Finding scripts for "before_plugin_install" hook from plugin phonegap-plugin-push on android platform only.
Executing script found in plugin phonegap-plugin-push for hook "before_plugin_install": plugins/phonegap-plugin-push/hooks/outsystems/handle_google_services.js
Failed to install 'phonegap-plugin-push': undefined
Error: Failed to install Pushwoosh plugin. Reason: Configuration zip file not found.

[2019-08-01T04:19:05.835Z] [ERROR] Build failed with the following error: Error installing Cordova plugin: phonegap-plugin-push.
[2019-08-01T04:19:05.836Z] [INFO] Remove debug/release signing properties
[2019-08-01T04:19:05.836Z] [INFO] Zipping application source...
[2019-08-01T04:19:24.269Z] [INFO] Application was not successfully generated!
[2019-08-01T04:19:24.269Z] [INFO] Execution time: 56962ms

This is my dependencies.

I also attach my OML.


Solution

Hi Harlin,


This error is thrown because it couldn't find the google-services.zip file inside the google-services folder.

To solve the error, make sure you include the "google-services.zip" file and set de Deploy Action to "Deploy to Target Directory" and the Target Directory to "google-services". (see picture)

This zip file should include the "google-services.json" (for Android) and "GoogleService-info.plist" (for iOS) files which you can download from the Firebase Console.


Note that this changed between the previous version (1.0.4) and the current (1.1.0), where previously you had to upload these files unzipped to the Target Directory.


Kind regards,

Timothy

Solution

Hi everyone. 


I still have that problem after doing all above you mentioned. Do you know any other reason why it can happen ?

the build for ios works fine. The problem is only Android.

Any solution found?

Timothy de Vries wrote:

Hi Harlin,


This error is thrown because it couldn't find the google-services.zip file inside the google-services folder.

To solve the error, make sure you include the "google-services.zip" file and set de Deploy Action to "Deploy to Target Directory" and the Target Directory to "google-services". (see picture)

This zip file should include the "google-services.json" (for Android) and "GoogleService-info.plist" (for iOS) files which you can download from the Firebase Console.


Note that this changed between the previous version (1.0.4) and the current (1.1.0), where previously you had to upload these files unzipped to the Target Directory.


Kind regards,

Timothy

This works perfectly for me, thanks.