I am trying to install Facebook Plugin using the Automatic Installation section mentioned here https://github.com/phonegap/phonegap-facebook-plugin for phonegap using this command
phonegap plugin add C:\Softwares\phonegap-facebook-plugin --variable APP_ID="240818432XXXXXX" --variable APP_NAME="MyAPPNAME"
and i get thie serror
[phonegap] adding the plugin: C:\Softwares\phone
[Error: Variable(s) missing: APP_ID, APP_NAME]
[error] Variable(s) missing: APP_ID, APP_NAME
So i saw this question and followed it Cordova Facebook plugin : missing variables APP_ID, APP_NAME
I installed plugman using nodejs and run the command below
plugman -d install --platform android --project C:\Users\Documents\myproject
--plugin C:\Softwares\phonegap-facebook-plugin --variable APP_ID="240818432XXXXXX"
--variable APP_NAME="MyAPPNAME"
and i get this error :
Installing "com.phonegap.plugins.facebookconnect" for android
cordova version check failed ("C:\Users\Documents\myproject\cordova\version")
, continuing anyways.
Install start for "com.phonegap.plugins.facebookconnect" on android.
Beginning processing of action stack for android project...
Error during processing of action! Attempting to revert...
Failed to install 'com.phonegap.plugins.facebookconnect':Error: Uh oh!
"C:\Users\Documents\myproject\res\values\facebookconnect.xml" already exists!
I am not sure if i am in the right way on installing facebookplugin for phonegap. I just followed the documentation in phonegap and this is what i get.
I am using windows7 64 bit.
Any guidance will be really appreciated.
Thanks
The project path is wrong. It should point to \myproject\platforms\android.
You need to run phonegap build android first to build this.
plugman -d install --platform android --project C:\Users\Documents\myproject
--plugin C:\Softwares\phonegap-facebook-plugin
--variable APP_ID="240818432XXXXXX" --variable APP_NAME="MyAPPNAME"
Related
while installing auth0 in ionic I'm facing this error.
ionic cordova plugin add #ionic-enterprise/auth-connect --variable AUTH_URL_SCHEME=com.company.app
The package #ionic-enterprise/auth is only available for subscriptors.
See: https://github.com/ionic-team/ionic-cli/issues/4359
I have an ionic 3 app that we have been using in production. I just did a new clone of the repo and tried to build the android version. It fails with:
com/ionicframework/common/IonicCordovaCommon.java:61: error: cannot find symbol
assetManager = cordova.getContext().getAssets();
^
symbol: method getContext()
location: variable cordova of type CordovaInterface
src/com/ionicframework/common/IonicCordovaCommon.java:116: error: cannot find symbol
Context c = cordova.getContext();
^
symbol: method getContext()
I did not change anything in the code base -- and it was working well a few hours ago before the clone of the repo.
This is due to a plugin. The package.json had the following spec:
"cordova-plugin-ionic": "^5.3.0",
Turns out the latest version of the plugin is not compatible. To fix, just change to
"cordova-plugin-ionic": "5.3.0",
That is stick to 5.3.0 -- and not later version.
Remove plugin:
cordova plugin rm cordova-plugin-ionic
Add older version
cordova plugin rm cordova-plugin-ionic#5.3.0
This fails with
cordova plugin add cordova-plugin-ionic#5.3.0
Variable(s) missing (use: --variable APP_ID=value --variable CHANNEL_NAME=value).
To fix remove platform android and add again.
cordova platform rm android; cordova platform add android#6.4
Once done, the build using
cordova build android
and see it succeed.
I am trying to add the plugin: cordova-plugin-facebook4 in my application with the ionic cordova plugin add command cordova-plugin-facebook4 - variable APP_ID =" 092809180912829 "--various APP_NAME =" test "
But whenever I install the plugin and useionic cordova build android`
I receive:
[ERROR] An error occurred while running subprocess cordova.
But if I remove the plugin, works perfectly build and run android.
I'm using ionic 4.3.0 / Cordova CLI 7.0.0 / Cordova platform: 7.0.0
Can anyone tell me what it can be? I found a lot on the internet, but none of the solutions worked for me and I no longer know what it can be. thanks
You can install the ionic-native facebook wrapper.
npm install #ionic-native/facebook#beta
and follow the instructions on Ionic-native facebook
When i tried to add ionic push plugin using
ionic plugin add https://github.com/phonegap-build/PushPlugin.git
i got following error in command promp
Updated the hooks directory to have execute permissions Fetching plugin "https://github.com/phonegap-build/PushPlugin.git" via git clone Repository "https://github.com/phonegap-build/PushPlugin.git" checked out to git ref "master". shell.js: internal error Error: EXDEV, cross-device link not permitted 'C:\Users\A-25\AppData\Local\Temp\git\1438839071751\Example'
at Error (native)
at Object.fs.renameSync (fs.js:636:18)
at C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\mv.js:77:8 at Array.forEach (native)
at Object._mv (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\mv.js:53:11)at Object.mv (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\common.js:186:23)
at C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\util\plugins.js:53:19
at _fulfilled (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:749:13)
can anybody tell me what's the problem?
i just downgrade my cordova version to 5.0.0 and it works
Without downgrading your cordova version you could try this
ionic plugin add cordova-plugin-push-notification
I had a similar question:
From an official blog post, Cordova is moving their plugins to npm.
I had the same problem with the ionic plugin add ... command that Mudasser mentioned. So, I installed it easily now with npm:
npm install phonegap-plugin-push
I am trying to add a plugin to Cordova via
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
git itself seems to run fine. Running the following works:
git clone "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git" "D:\Temp\plugman-tmp1390234462383"
This is what is used in plugins.js line 43 (var cmd = util.format(...)).
The error I receive using the cordova plugin add ... is:
Calling plugman.fetch on plugin "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git"
Fetching plugin from "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git"...
Fetching plugin via git-clone command: git clone "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git" "D:\Temp\plugman-tmp1390235833828"
C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:126
throw e;
^
Error: Fetching plugin failed: Error: Command failed: Cloning into 'D:\Temp\plugman-tmp1390234462383'...
fatal: unable to access 'https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git/': Failed connect to git-wip-us.apache.org:443; No error
at C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\src\plugin.js:90:41
at _rejected (C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:808:24)
at C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:834:30
at Promise.when (C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:1079:31)
at Promise.promise.promiseDispatch (C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:752:41)
at C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:574:44
at flush (C:\Users\myUser\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:415:13)
Any idea?
Some more information:
I am going through a proxy, but I set this for git and for npm. I installed Cordova via "npm install cordova" and the project via "cordova create TestApp", I added platforms via "cordova platform add android" and I can run the app on the emulator.
I even tried "phonegap local plugin add https..." with the same result.
All that is missing for me is to add plugins.
Sometimes a Cordova update will cause problems with npm and will corrupt the "cordova cache" that NPM uses to quickly download different Cordova versions. I know there were problems with the server pushing the latest Cordova plugins to NPM, so maybe this is why you're having trouble.
I'd suggest deleting /AppData/Roaming/npm/node_modules/cordova direct in its entirety, than installing a fresh new copy with npm install -g cordova. This shouldn't remove any of your Cordova projects, it will just download a fresh set of the tools. When you run cordova commands, it might take longer the first time since the tools will have to go to the git repo's and fetch the content fresh.
Tried clearing the cordova cache by deleting the folder as suggested by #mbillau but that didn't help. I search for the plugin where I was getting the error and tried installing through command line but got the same error message. Finally the solution that worked for me:
open important files in your IDE
open Cordova plugins
replace all "https://git-wip-us.apache.org/repos/asf/" with "https://git.apache.org/"
and it worked perfectly.
Replace "git-wip-us.apache.org/repos/asf7" with "github.com/apache/"
Like #Max said.
Checking the apache site (either https://git-wip-us.apache.org/repos/asf/, https://gitbox.org/repos/asf/, or https://git.apache.org/) I only see commit logs instead of the sources.
The sources can be found on GitHub. This worked for me:
cordova plugin add https://github.com/apache/cordova-plugin-device.git