wizpanda / cordova-plugin-firebase-lib

This repository is moving & merging to https://github.com/wizpanda/cordova-plugin-firebase-lib to avoid confusion to developers.
https://www.wizpanda.com/
MIT License
68 stars 38 forks source link

Error trying to uninstall plugin #42

Open newuser44 opened 4 years ago

newuser44 commented 4 years ago

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.

newuser44 commented 4 years ago

A long the same lines -- trying to get version 4 of the plugin installed. Removed any trace of the plugin. Removed Android and added Android 8.0 so the plugin could be added.

Getting this error.

cordova plugin add cordova-plugin-firebase-lib@4.1.0 --save Installing "cordova-plugin-firebase-lib" for android Plugin doesn't support this project's cordova version. cordova: 8.0.0, failed version requirement: >=9.0.0 Skipping 'cordova-plugin-firebase-lib' for android Adding cordova-plugin-firebase-lib to package.json Saved plugin info for "cordova-plugin-firebase-lib" to config.xml config file -Info.plist requested for changes not found at /home/dev/Ionic-app/apps/newapp/platforms/android/-Info.plist, ignoring config file -Info.plist requested for changes not found at /home/dev/Ionic-app/apps/newapp/platforms/android/-Info.plist, ignoring config file -Info.plist requested for changes not found at /home/dev/Ionic-app/apps/newapp/platforms/android/-Info.plist, ignoring

I thought 4.x was for cordova 8.0?? Config.xml has 4.1.0 plugin info has cordova-plugin-firebase-lib 5.1.1 "Google Firebase Plugin"

Any help would be appreciated.

sagrawal31 commented 4 years ago

Please check https://github.com/wizpanda/cordova-plugin-firebase-lib#install-this-plugin

sagrawal31 commented 4 years ago

Anyways, a release is coming for this plugin which will solve the problem at the time of installation.

newuser44 commented 4 years ago

Thanks. I was able to get version 4 of the plugin installed just by us @4 instead of @4.1.1 (which seems to look for version 5). I can see data in the stream view on firebase. I'm not seeing the location like before (show something on the map). Thanks again.