Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova)

When I try do a ‘ionic cordova run android’ I am getting the below error. Can someone please suggest a solution? Please note that the app had ran successfully before previously and I guess after I updated to the latest Ionic CLI and the plugins, I have started to get this error

[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova).
Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char:

please include a full error message

I have copy pasted the whole error message onlyCapture

this is xml related issue, see more here: https://github.com/Leonidas-from-XIV/node-xml2js/issues/368

My guess would be config.xml.

Can you run the same command with --verbose please, maybe there is more useful output.

@Sujan12 got this result:
C:\MAPP\wemartmobile\WeMartMobile>ionic cordova run android --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: ‘C:\MAPP\wemartmobile\WeMartMobile’, local: true, binPath:
‘C:\Users\d.dutta.chowdhury\AppData\Roaming\npm\node_modules\ionic\bin\ionic’, libPath:
‘C:\MAPP\wemartmobile\WeMartMobile\node_modules\ionic\dist\index.js’ }
[DEBUG] Loading local plugin @ionic/cli-plugin-proxy
[DEBUG] Throwing PLUGIN_NOT_INSTALLED for local @ionic/cli-plugin-proxy
[DEBUG] Loading local plugin @ionic/cli-plugin-cordova
[DEBUG] Loading local plugin @ionic/cli-plugin-ionic-angular
[DEBUG] New daemon pid: 13020
[DEBUG] Getting plugin info for ionic
[DEBUG] Checking for latest plugin version of ionic@latest.
[DEBUG] Getting plugin info for @ionic/cli-plugin-cordova
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-cordova@latest.
[DEBUG] Getting plugin info for @ionic/cli-plugin-ionic-angular
[DEBUG] Checking for latest plugin version of @ionic/cli-plugin-ionic-angular@latest.
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova).
Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char:
[DEBUG] Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char:
at error (C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\node_modules\sax\lib\sax.js:666:10)
at strictFail (C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\node_modules\sax\lib\sax.js:692:7)
at beginWhiteSpace
(C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\node_modules\sax\lib\sax.js:965:7)
at Object.write (C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\node_modules\sax\lib\sax.js:1006:11)
at XMLParser.feed (C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\lib\parsers\sax.js:48:15)
at ElementTree.parse (C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\lib\elementtree.js:271:10)
at Object.parse (C:\MAPP\wemartmobile\WeMartMobile\node_modules\elementtree\lib\elementtree.js:584:8)
at Function.
(C:\MAPP\wemartmobile\WeMartMobile\node_modules@ionic\cli-plugin-cordova\dist\lib\utils\configXml.js:28:28)
at next (native)
at fulfilled (C:\MAPP\wemartmobile\WeMartMobile\node_modules\tslib\tslib.js:93:62)

yes config.xml had got corrupted…you were right

1 Like