Error trying to uninstall plugin #42
Description
Describe the bug
I had installed version 5 of the plugin but I'm using Cordova Android 8.0.
Trying to remove the plugin gave me an error.
I thought I had installed version 4, but I get the same error.
cordova plugin remove cordova-plugin-firebase-lib --save
cordova-android-support-gradle-release: removed Gradle config file: platforms/android/app/cordova-android-support-gradle-release/properties.gradle
cordova-android-support-gradle-release: removed Gradle config file: platforms/android/app/src/main/cordova-android-support-gradle-release/properties.gradle
Uninstalling cordova-plugin-firebase-lib from android
Error during processing of action! Attempting to revert...
(node:7346) UnhandledPromiseRejectionWarning: Error: Uh oh!
ENOENT: no such file or directory, open '/home/dev/Ionic-app/apps/newapp/platforms/android/app/src/main/AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (/home/dev/Ionic-app/apps/node_modules/cordova-common/src/util/xml-helpers.js:181:36)
at new AndroidManifest (/home/dev/Ionic-app/apps/newapp/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/home/dev/Ionic-app/apps/newapp/platforms/android/cordova/lib/AndroidProject.js:92:12)
at AndroidProject.getCustomSubprojectRelativeDir (/home/dev/Ionic-app/apps/newapp/platforms/android/cordova/lib/AndroidProject.js:98:28)
at uninstall (/home/dev/Ionic-app/apps/newapp/platforms/android/cordova/lib/pluginHandlers.js:104:46)
at ActionStack.process (/home/dev/Ionic-app/apps/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/home/dev/Ionic-app/apps/node_modules/cordova-common/src/PluginManager.js:114:20)
at PluginManager.removePlugin (/home/dev/Ionic-app/apps/node_modules/cordova-common/src/PluginManager.js:148:17)
(node:7346) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7346) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
To Reproduce
Set up an ionic app with Cordova 8.0 (just updated to it). Ionic 3.20.1 and new Android 8.0.0 (updated).
Install the cordova-pligin-firebase-lib and remove it.
causes error.
Expected behavior
Not delete the AndroidManafest.xml file when removing the plugin.
Plugin version
I installed the latest and got the error that I was using the wrong version.
Tried to uninstall got the error above. Tried to manually remove any trace and install version 4.
Config.xml had this version.
Cleared plugin folder, removed and added android 8.0 to let it installed the plugins.
But it installed 5.1 again.
Config.xml yes 4.1.0
plugin list says
cordova-plugin-firebase-lib 5.1.1 "Google Firebase Plugin"
Desktop (please complete the following information):
Windows 10
Chrome 72
Smartphone (please complete the following information):
NA
Additional context
The real problem I'm having is getting Google Analytics to show data. Trying to get the versions correct.