Enrico Giordani created CB-13830:
------------------------------------

             Summary: [email protected] fails to add a plugin previously 
removed
                 Key: CB-13830
                 URL: https://issues.apache.org/jira/browse/CB-13830
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-android
    Affects Versions: cordova-android-7.0.0
         Environment: macOS 10.12.6

node 9.4.0

Cordova 8.0.0

 
            Reporter: Enrico Giordani
            Assignee: Joe Bowser


Removing a plugin and than adding it again, causes an error:

*$ cordova create testapp*

*$ cd testapp*

*$ cordova platform add android*
Using cordova-fetch for cordova-android@~7.0.0
Adding android project...
Creating Cordova project for the Android platform:
 Path: platforms/android
 Package: io.cordova.hellocordova
 Name: HelloCordova
 Activity: MainActivity
 Android target: android-26
Subproject Path: CordovaLib
Subproject Path: app
Android project created with [email protected]
Android Studio project detected
Android Studio project detected
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the 
project
Installing "cordova-plugin-whitelist" for android

This plugin is only applicable for versions of cordova-android greater than 
4.0. If you have a previous platform version, you do *not* need this plugin 
since the whitelist will be built in.
 
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving android@~7.0.0 into config.xml file ...

*$ cordova plugin add cordova-plugin-camera*
Installing "cordova-plugin-camera" for android
Android Studio project detected
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-camera to package.json
Saved plugin info for "cordova-plugin-camera" to config.xml

*$ cordova plugin add cordova-plugin-camera*
Installing "cordova-plugin-camera" for android
Android Studio project detected
Subproject Path: CordovaLib
Subproject Path: app
Adding cordova-plugin-camera to package.json
Saved plugin info for "cordova-plugin-camera" to config.xml

*$ cordova plugin add cordova-plugin-camera*
Installing "cordova-plugin-camera" for android
Android Studio project detected
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-camera': CordovaError: Uh oh!
"/Users/enrico/tmp/testapp/platforms/android/app/src/main/res/xml/provider_paths.xml"
 already exists!
 at copyNewFile 
(/Users/enrico/tmp/testapp/platforms/android/cordova/lib/pluginHandlers.js:261:45)
 at install 
(/Users/enrico/tmp/testapp/platforms/android/cordova/lib/pluginHandlers.js:51:17)
 at ActionStack.process 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
 at PluginManager.doOperation 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
 at PluginManager.addPlugin 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
 at /Users/enrico/tmp/testapp/platforms/android/cordova/Api.js:247:74
 at _fulfilled 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:854:54)
 at self.promiseDispatch.done 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:883:30)
 at Promise.promise.promiseDispatch 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:816:13)
 at 
/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:570:49
(node:5722) UnhandledPromiseRejectionWarning: CordovaError: Uh oh!
"/Users/enrico/tmp/testapp/platforms/android/app/src/main/res/xml/provider_paths.xml"
 already exists!
 at copyNewFile 
(/Users/enrico/tmp/testapp/platforms/android/cordova/lib/pluginHandlers.js:261:45)
 at install 
(/Users/enrico/tmp/testapp/platforms/android/cordova/lib/pluginHandlers.js:51:17)
 at ActionStack.process 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
 at PluginManager.doOperation 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
 at PluginManager.addPlugin 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:144:17)
 at /Users/enrico/tmp/testapp/platforms/android/cordova/Api.js:247:74
 at _fulfilled 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:854:54)
 at self.promiseDispatch.done 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:883:30)
 at Promise.promise.promiseDispatch 
(/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:816:13)
 at 
/Users/enrico/tmp/testapp/platforms/android/cordova/node_modules/q/q.js:570:49
(node:5722) 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:5722) [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.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to