[Firebase Mobile] Unable to generate Android APP

Forge Component
(10)
Published on 31 May (2 weeks ago) by David Sousa
10 votes
Published on 31 May (2 weeks ago) by David Sousa

Im unable to generate Android Native App.

Can you help me?

LOG:

[2019-05-31T12:42:32.395Z] [INFO] Start processing job request...
[2019-05-31T12:42:32.396Z] [INFO] Start generating application...
[2019-05-31T12:42:32.397Z] [INFO] Template version: 4.2.3
[2019-05-31T12:42:32.397Z] [INFO] Build features: cordovaNoFetch - true
[2019-05-31T12:42:32.397Z] [INFO] Build features: buildTimeout - 20
[2019-05-31T12:42:32.397Z] [INFO] Creating a temporary folder for the application...
[2019-05-31T12:42:32.397Z] [INFO] Creating the required directory structure for your cordova application...
[2019-05-31T12:42:38.832Z] [INFO] Getting application resources...
[2019-05-31T12:42:38.841Z] [INFO] Processing application resources...
[2019-05-31T12:42:39.033Z] [INFO] Generating application assets...
[2019-05-31T12:42:39.780Z] [INFO] Applying configurations in the config.xml file...
[2019-05-31T12:42:39.785Z] [INFO] Applying advanced configurations in the config.xml file...
[2019-05-31T12:42:39.785Z] [INFO] Applying custom application icons...
[2019-05-31T12:42:39.786Z] [INFO] Applying custom application splashscreens...
[2019-05-31T12:42:39.786Z] [INFO] Applying application preferences...
[2019-05-31T12:42:39.786Z] [INFO] Applying application accessList...
[2019-05-31T12:42:39.786Z] [INFO] Adding target platform...
[2019-05-31T12:43:15.645Z] [INFO] Applying plugins in the config.xml file...
[2019-05-31T12:43:15.645Z] [INFO] Plugin Id: https://github.com/greybax/cordova-plugin-native-spinner
[2019-05-31T12:43:15.645Z] [INFO] Plugin Action: add
[2019-05-31T12:43:18.123Z] [INFO] Plugin Id: https://github.com/OutSystems/cordova-plugin-camera#4.0.3-OS
[2019-05-31T12:43:18.123Z] [INFO] Plugin Action: add
[2019-05-31T12:43:21.057Z] [INFO] Plugin Id: https://github.com/TruewindIT/cordova-plugin-firebase#1.6
[2019-05-31T12:43:21.057Z] [INFO] Plugin Action: add
[2019-05-31T12:43:32.861Z] [ERROR]
You have been opted out of telemetry. To change this, run: cordova telemetry on.
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "https://github.com/TruewindIT/cordova-plugin-firebase#1.6"
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/1559306602200
Command finished with error code 0: git clone,https://github.com/TruewindIT/cordova-plugin-firebase,/tmp/git/1559306602200
Running command: git checkout 1.6
Command finished with error code 0: git checkout,1.6
Repository "https://github.com/TruewindIT/cordova-plugin-firebase" checked out to git ref "1.6".
/tmp/build/source/plugins/cordova-plugin-firebase"...
Plugin "cordova-plugin-firebase" fetched.
Calling plugman.install on plugin "/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/plugins/cordova-plugin-firebase" for platform "android
Installing "cordova-plugin-firebase" for android
Running command: /opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/platforms/android/cordova/version
Command finished with error code 0: /opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/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
{ Error: ENOENT: no such file or directory, scandir '/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/www/firebase.dev.hardsoft.CDFTI'
    at Object.fs.readdirSync (fs.js:904:18)
    at getFilesFromPath (/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/plugins/cordova-plugin-firebase/scripts/configurations/utilities.js:37:13)
    at Object.getZipFile (/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/plugins/cordova-plugin-firebase/scripts/configurations/utilities.js:61:17)
    at module.exports (/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/plugins/cordova-plugin-firebase/scripts/configurations/unzipAndCopyConfigurations.js:40:37)
    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)
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/www/firebase.dev.hardsoft.CDFTI' }
No zip file found containing google services configuration file
Failed to install 'cordova-plugin-firebase': Error: ENOENT: no such file or directory, scandir '/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/platforms/android/assets/www/google-services'
    at Object.fs.readdirSync (fs.js:904:18)
    at Object.getFilesFromPath (/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/plugins/cordova-plugin-firebase/scripts/configurations/utilities.js:37:13)
    at module.exports (/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/plugins/cordova-plugin-firebase/scripts/configurations/unzipAndCopyConfigurations.js:50:21)
    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: ENOENT: no such file or directory, scandir '/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/platforms/android/assets/www/google-services'

[2019-05-31T12:43:32.861Z] [ERROR] /tmp/build/source/platforms/android/assets/www/google-services.
[2019-05-31T12:43:32.861Z] [INFO] Remove debug/release signing properties
[2019-05-31T12:43:32.861Z] [INFO] Zipping application source...
[2019-05-31T12:43:40.683Z] [INFO] Application was not successfully generated!
[2019-05-31T12:43:40.683Z] [INFO] Execution time: 68326ms

From the look of it you are missing the google-services file:

Error: ENOENT: no such file or directory, scandir '/opt/NativeBuilder/builds/4dfa62aa-4bd3-4841-8b1b-b7cf25be5021/source/platforms/android/assets/www/google-services

Best regards

PC

I get this error... 

Hello, 

Only to track your steps:

First you create a zip with this two files: google-services.json and GoogleService-Info.plis;

After you import to you resources with this:

  • Name: google-services.zip
  • Deploy action: deploy to target directory
  • Target directory: concatenation of firebase. and your app identifier.

The difference that i see in the configuration is that firebase should be in lower case, and you start with upper case. Can you check?