Failed to install 'cordova-plugin-firebase': TypeError: Path must be a string. Receiv

Hi Guys,

We are trying to generate Notifications sample but we are getting build generation issues.

Following are the steps which we followed:

1)Created Firebase application for both ios and android.

2)Uploaded APNS for ios in firebase console.

3)Downloaded plist and googleservices.json and made zip and attached under resources file. and deployed it in the target directory.(with the firebase.appidentifier).

4)We have used Firebase Mobile 1.0.6 version and MABS 5.2 version.(we are using outsystems 11)

5)For build generation we have added developer certificate and provisioning profile.

what else we have missed please let us know help us in solving this issue.


Android log:


[2020-02-13T06:50:51.422Z] [INFO] Start processing job request...
[2020-02-13T06:50:51.427Z] [INFO] Start generating application...
[2020-02-13T06:50:51.429Z] [INFO] Template version: 5.4.0
[2020-02-13T06:50:51.429Z] [INFO] Build features: cordovaNoFetch - true
[2020-02-13T06:50:51.429Z] [INFO] Build features: buildTimeout - 20
[2020-02-13T06:50:51.430Z] [INFO] Creating a temporary folder for the application...
[2020-02-13T06:50:51.430Z] [INFO] Creating the required directory structure for your cordova application...
[2020-02-13T06:50:57.056Z] [INFO] Getting application resources...
[2020-02-13T06:50:57.071Z] [INFO] Processing application resources...
[2020-02-13T06:50:57.243Z] [INFO] Generating application assets...
[2020-02-13T06:50:57.472Z] [INFO] Applying configurations in the config.xml file...
[2020-02-13T06:50:57.485Z] [INFO] Applying advanced configurations in the config.xml file...
[2020-02-13T06:50:57.486Z] [INFO] Applying custom application icons...
[2020-02-13T06:50:57.486Z] [INFO] Applying custom application splashscreens...
[2020-02-13T06:50:57.487Z] [INFO] Applying application preferences...
[2020-02-13T06:50:57.487Z] [INFO] Applying application accessList...
[2020-02-13T06:50:57.488Z] [INFO] Adding target platform...
[2020-02-13T06:51:32.945Z] [INFO] Applying plugins in the config.xml file...
[2020-02-13T06:51:32.947Z] [INFO] Plugin Id: https://github.com/TruewindIT/cordova-plugin-firebase#1.8
[2020-02-13T06:51:32.947Z] [INFO] Plugin Action: add
[2020-02-13T06:51:43.277Z] [ERROR] No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "https://github.com/TruewindIT/cordova-plugin-firebase#1.8"
Fetching plugin "https://github.com/TruewindIT/cordova-plugin-firebase" via git clone
Running command: git clone https://github.com/TruewindIT/cordova-plugin-firebase /tmp/git/1581576693763
Command finished with error code 0: git clone,https://github.com/TruewindIT/cordova-plugin-firebase,/tmp/git/1581576693763
Running command: git checkout 1.8
Command finished with error code 0: git checkout,1.8
Repository "https://github.com/TruewindIT/cordova-plugin-firebase" checked out to git ref "1.8".
/tmp/build/source/plugins/cordova-plugin-firebase"...
Plugin "cordova-plugin-firebase" fetched.
Calling plugman.install on plugin "/opt/NativeBuilder/builds/b6345b86-0c22-4d2a-8488-51e9fda6b8c3/source/plugins/cordova-plugin-firebase" for platform "android
Installing "cordova-plugin-firebase" for android
Running command: /opt/NativeBuilder/builds/b6345b86-0c22-4d2a-8488-51e9fda6b8c3/source/platforms/android/cordova/version
Command finished with error code 0: /opt/NativeBuilder/builds/b6345b86-0c22-4d2a-8488-51e9fda6b8c3/source/platforms/android/cordova/version
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-firebase on android platform only.
Executing script found in plugin cordova-plugin-firebase for hook "before_plugin_install": plugins/cordova-plugin-firebase/scripts/configurations/installDependencies.js
7.1.0
Resolving module name for child_process => child_process
Resolving module name for q => q
Executing script found in plugin cordova-plugin-firebase for hook "before_plugin_install": plugins/cordova-plugin-firebase/scripts/configurations/unzipAndCopyConfigurations.js
7.1.0
7.1.0
Resolving module name for q => q
7.1.0
Resolving module name for elementtree => elementtree
7.1.0
Using deprecated way to look for configuration files' folder
No file found
Failed to install 'cordova-plugin-firebase': TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.join (path.js:1233:7)
    at module.exports (/opt/NativeBuilder/builds/b6345b86-0c22-4d2a-8488-51e9fda6b8c3/source/plugins/cordova-plugin-firebase/scripts/configurations/unzipAndCopyConfigurations.js:53:29)
    at runScriptViaModuleLoader (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:18)
    at runScript (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:164:16)
    at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:132:20
    at _fulfilled (/usr/lib/node_modules/cordova/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/cordova/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/cordova/node_modules/q/q.js:749:13)
    at /usr/lib/node_modules/cordova/node_modules/q/q.js:557:44
Error: Path must be a string. Received undefined

[2020-02-13T06:51:43.278Z] [ERROR] Build failed with the following error: Error installing Cordova plugin: cordova-plugin-firebase.
[2020-02-13T06:51:43.278Z] [INFO] Remove debug/release signing properties
[2020-02-13T06:51:43.279Z] [INFO] Zipping application source...
[2020-02-13T06:52:00.983Z] [INFO] Application was not successfully generated!
[2020-02-13T06:52:00.986Z] [INFO] Execution time: 69608ms


Hello Harish, 


are you using the Firebase Mobile forge component? If yes, you should add this in the plugin support. Like that the who built the plugin will try to answer you. 


Camila

Solution

We have combined two files in a folder and zipped that folder which we should not do, we need to zip both the files., then we have got resolved the issue build has been generated succefully.


Thanks

Harish

Solution