Open jacquesdev opened 6 years ago
It seems this issue is caused by the reformatting of the config.xml file - as mentioned here. https://github.com/ionic-team/ionic-cli/issues/2230
It seems to sometimes add incomplete nodes while it's going through all the plugins to install - which then breaks any other plugins being installed. (I tend install a bunch of them at a time using a gulp task, especially when switching environments).
So going to switch to the original cordova add plugin for the moment.
What method do you use to install a bunch of them at a time?
I basically wrap each one in a promise, which is executed by sh.exec.
const addPlugin = (plugin) => {
return new Promise((resolve, reject) => {
sh.exec(
'ionic cordova plugin add ' + plugin,
{ async: true },
(code, output) => {
if (code === 1) {
reject(plugin)
}
resolve(plugin)
})
})
}
I get this error:
$ ionic cordova plugin add cordova-plugin-firebase-dynamiclinks --save --variable APP_DOMAIN="myname.app.goo.gl" --variable APP_PATH="/"
Error: Forward-slash in opening tag not followed by >
Line: 60
Column: 0
Char:
at error ( ...npm-global/lib/node_modules/ionic/node_modules/sax/lib/sax.js:666:10)
UPDATE: sorry, there was an error in config.xml
Check your config.xml file, usually the end of it - you will probably see a xml node starting with />.
You should just be able to delete the weird bit of code at the end and try again
thanks, it was that problem
Since Last Two Days I am trying to install cordova-plugin-firebase-dynamiclinks but i am getting folowing I have search on google for error but I am not getting any solution and I am not able to understand why this error is comming. Please help
I get this error:
D:\Apps\myapp>ionic cordova platform add android
cordova.cmd platform add android Using cordova-fetch for cordova-android@^8.0.0 Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: com.myapp.application Name: MyApp Activity: MainActivity Android target: android-28 Subproject Path: CordovaLib Subproject Path: app Android project created with cordova-android@8.1.0 Installing "cordova-plugin-android-permissions" for android Installing "cordova-plugin-androidx" for android Installing "cordova-plugin-androidx-adapter" for android Installing "cordova-plugin-contacts" for android Installing "cordova-plugin-device" for android Installing "cordova-plugin-firebase-dynamiclinks" for android Plugin dependency "cordova-support-android-plugin@1.0.1" already fetched, using that version. Installing "cordova-support-android-plugin" for android Plugin dependency "cordova-support-google-services@1.3.2" already fetched, usin that version. Installing "cordova-support-google-services" for android Subproject Path: CordovaLib Subproject Path: app Failed to install 'cordova-plugin-firebase-dynamiclinks': Error: Invalid charac er in entity name Line: 0 Column: 283 Char: = at error (D:\Apps\myapp\node_modules\elementtree\node_modules\sax\lib\ ax.js:666:10) at strictFail (D:\Apps\myapp\node_modules\elementtree\node_modules\sax lib\sax.js:692:7) at SAXParser.write (D:\Apps\myapp\node_modules\elementtree\node_module \sax\lib\sax.js:1491:13) at XMLParser.feed (D:\Apps\myapp\node_modules\elementtree\lib\parsers\ ax.js:48:15) at ElementTree.parse (D:\Apps\myapp\node_modules\elementtree\lib\eleme ttree.js:271:10) at Object.exports.XML (D:\Apps\myapp\node_modules\elementtree\lib\elem nttree.js:606:13) at ConfigFile_graft_child [as graft_child] (D:\Apps\myapp\node_modules cordova-common\src\ConfigChanges\ConfigFile.js:107:40) at PlatformMunger_apply_file_munge [as apply_file_munge] (D:\Apps\myapp \node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:81:34) at munge_helper (D:\Apps\myapp\node_modules\cordova-common\src\ConfigC anges\ConfigChanges.js:252:14) Invalid character in entity name Line: 0 Column: 283 Char: = at PlatformMunger.add_plugin_changes (D:\Apps\myapp\node_modules\cordo a-common\src\ConfigChanges\ConfigChanges.js:159:12) [ERROR] An error occurred while running subprocess cordova.
cordova.cmd platform add android exited with exit code 1.
Re-running this command with the --verbose flag may provide more
information.
Description: Unable to install cordova plugins using
ionic cordova add plugin
. I get the errors for every plugin I try to install this way.Steps to Reproduce: Install a plugin using
ionic cordova add plugin
. I have tried this thousands of times, tried upgrading to the latest cordova, but nothing help, unless I install the plugins usingcordova add plugin
Output:
My
ionic info
: