Giter Site home page Giter Site logo

Comments (11)

wallden avatar wallden commented on May 13, 2024 4

I had <resource-file src="GoogleService-Info.plist" /> in my config.xml - removing that solved my problem since it causes cordova to write to the Resources-folder of the ios installation

from cordova-plugin-firebase.

julienroubieu avatar julienroubieu commented on May 13, 2024 2

This still happens whenever you remove and add a platform back, with the plugin previously installed.
I'm guessing that both the hook and and the dummy files from src (referenced by plugin.xml) are trying to be copied to the same location.

In my case, since my build process always recreates the platform, I removed <source-file src="src/android/google-services.json" target-dir="." /> and <resource-file src="src/ios/GoogleService-Info.plist" target="Resources/GoogleService-Info.plist" /> from plugin.xml. The hook still copies both files from the root folder of my project.

from cordova-plugin-firebase.

robertarnesson avatar robertarnesson commented on May 13, 2024

what other plugins are you using?

from cordova-plugin-firebase.

KhomkribSingh avatar KhomkribSingh commented on May 13, 2024

My Plugins:

  • com.lampa.startapp 0.1.4 "startApp"
  • com.phonegap.plugins.PushPlugin 2.4.0 "PushPlugin" (with android-support-v13.jar)
  • com.telerik.plugins.healthkit 0.4.2 "HealthKit"
  • cordova-plugin-camera 2.2.1-dev "Camera"
  • cordova-plugin-compat 1.0.0 "Compat"
  • cordova-plugin-customurlscheme 4.1.3 "Custom URL scheme"
  • cordova-plugin-device 1.1.2 "Device"
  • cordova-plugin-dialogs 1.2.0 "Notification"
  • cordova-plugin-file 4.1.1 "File"
  • cordova-plugin-file-transfer 1.5.1 "File Transfer"
  • cordova-plugin-firebase 0.1.9 "Google Firebase Plugin"
  • cordova-plugin-geolocation 2.1.0 "Geolocation"
  • cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
  • cordova-plugin-media 2.2.0 "Media"
  • cordova-plugin-splashscreen 4.0.0 "Splashscreen"
  • cordova-plugin-themeablebrowser 0.2.15 "ThemeableBrowser"
  • cordova-plugin-whitelist 1.2.1 "Whitelist"
  • cordova-plugin-x-socialsharing 5.1.1 "SocialSharing"
  • ionic-plugin-keyboard 2.2.0 "Keyboard"
  • phonegap-facebook-plugin 0.12.0 "Facebook Connect" (with android-support-v13.jar)

from cordova-plugin-firebase.

robertarnesson avatar robertarnesson commented on May 13, 2024

this plugin replaces PushPlugin so don't use both

from cordova-plugin-firebase.

KhomkribSingh avatar KhomkribSingh commented on May 13, 2024

I use this PushPlugin in both cordova iOS and Android platforms but I need to add firebase analytic to my app. I should remove pushPlugin and use push function from this firebase plugin instead. Is it right?

from cordova-plugin-firebase.

KhomkribSingh avatar KhomkribSingh commented on May 13, 2024

After I remove pushPlugin I got the same error message:

Installing plugin "cordova-plugin-firebase" following successful platform add of android
Found variables for "cordova-plugin-firebase". Processing as cli_variables.
Installing "cordova-plugin-firebase" for android
Running command: cmd "/s /c "(ProjectPath)\platforms\android\cordova\version.bat""
Command finished with error code 0: cmd /s /c "(ProjectPath)\platforms\android\cordova\version.bat"
Executing "before_plugin_install" hook for "cordova-plugin-firebase" on android.
Install start for "cordova-plugin-firebase" on android.
Beginning processing of action stack for android project...
MDAVSCLI : warning : Error during processing of action! Attempting to revert...
MDAVSCLI : warning : Failed to install 'cordova-plugin-firebase':Error Uh oh!
"(ProjectPath)\platforms\android\google-services.json" already exists!
at Object.module.exports.common.copyNewFile (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\src\plugman\platforms\common.js:67:19)
at module.exports.source-file.install (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\src\plugman\platforms\android.js:78:20)
at C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\src\platforms\PlatformApiPoly.js:654:27
at Object.ActionStack.process (C:\Users\Khomkrib\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\node_modules\cordova-common\src\ActionStack.js:56:25)
at PlatformApiPoly.addPlugin (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\src\platforms\PlatformApiPoly.js:259:20)
at handleInstall (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:603:6)
at C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:382:28
at _fulfilled (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\AppData\Roaming\npm\node_modules\vs-tac\node_modules\cordova\5.4.1\node_modules\cordova\node_modules\q\q.js:749:13)
MDAVSCLI : error : Uh oh!
"\platforms\android\google-services.json" already exists!
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

from cordova-plugin-firebase.

robertarnesson avatar robertarnesson commented on May 13, 2024

have you tried to make a clean build?

from cordova-plugin-firebase.

KhomkribSingh avatar KhomkribSingh commented on May 13, 2024

Yes, I made a clean build and remove project platforms before.

from cordova-plugin-firebase.

robertarnesson avatar robertarnesson commented on May 13, 2024

then one of the other plugins you use also write the google-services.json file, or you are writing it yourself. There can only be one file, which is why its failing. We could change the hook to just throw a warning but that won't fix the actual problem

from cordova-plugin-firebase.

alokps6295 avatar alokps6295 commented on May 13, 2024

in your config.xml first install cordova-plugin-firebase then push plugin then this problem would be resolved. But make sure to first remove both plugins from plugins folder after removing platform

from cordova-plugin-firebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.