Monaca Onsen UI Discord Chat Github Repo

Firebase plugin build fail (cordova-plugin-firebasex)



  • Hi everybody.

    I am facing a problem trying to use the Firebase Cordova plugin suggested in the tutorial from Monaca Docs:
    https://docs.monaca.io/en/tutorials/firebase/

    The plugin is “cordova-plugin-firebasex”:
    https://github.com/dpa99c/cordova-plugin-firebasex

    It works fine in Android (where I use it for Firebase Analytics) but the iOS building process fails.

    Since the customer needs to keep collecting stats, I am willing to use a different plugin as long as it allows Firebase Analytics events logging.

    When I try a “Simulator build” it fails with the following errors:

    Installing "cordova-plugin-firebasex" for ios
    Installing "cordova-plugin-androidx" for iosInstalling "cordova-plugin-androidx-adapter" for iosRunning command: pod install --verbose  Cloning into 'cocoapods-'...
    
    
      fatal: repository 'https://cdn.cocoapods.org/' not found
    
    
    Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 1 Error output:
    Cloning into 'cocoapods-'...
      fatal: repository 'https://cdn.cocoapods.org/' not found
        at ChildProcess.whenDone (/private/tmp/download/node_modules/cordova-common/src/superspawn.js:135:23)
        at ChildProcess.emit (events.js:189:13)
        at maybeClose (internal/child_process.js:970:16)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    Failed to restore plugin "cordova-plugin-firebasex" from config.xml. You might need to try adding it again. Error: Error: pod: Command failed with exit code 1 Error output:
    Cloning into 'cocoapods-'...
      fatal: repository 'https://cdn.cocoapods.org/' not found
    cordova-custom-config: Applied custom config from config.xml to /private/tmp/download/platforms/ios/XXX.xcodeproj/project.pbxproj
    cordova-custom-config: Applied custom config from config.xml to /private/tmp/download/platforms/ios/XXX/XXX-Info.plist
    Preparing Firebase on iOS
    

    Thanks in advance.



  • I forgot to mention that my project is based on Cordova 9.0.0.

    For anybody who may face the same problem, I finally solved by installing version 6.0.2 of cordova-plugin-firebasex, the same used in the Monaca demo.

    All cordova-plugin-firebasex versions »