[
https://issues.apache.org/jira/browse/CB-9560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14717724#comment-14717724
]
ASF GitHub Bot commented on CB-9560:
------------------------------------
Github user marcuspridham commented on the pull request:
https://github.com/apache/cordova-lib/pull/288#issuecomment-135579250
Yep it does seem to happen with cordova-plugin-file-transfer and
cordova-plugin-file. I added the following to the default cordova project
config.xml and added a platform
<plugin name="cordova-plugin-file-transfer" spec="~1.2.1" />
<plugin name="cordova-plugin-file" spec="~3.0.0" />
You can see in the output that it is trying to install the file plugin
twice. With my change the error does not happen...
Cyar:cdvtest marcuspridham$ cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-22
Copying template files...
Android project created with [email protected]
Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to
the project
Discovered plugin "cordova-plugin-file-transfer" in config.xml. Installing
to the project
Discovered plugin "cordova-plugin-file" in config.xml. Installing to the
project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Fetching plugin "cordova-plugin-file-transfer@~1.2.1" via npm
Fetching plugin "cordova-plugin-file@~3.0.0" via npm
Installing "cordova-plugin-whitelist" for android
Installing "cordova-plugin-file-transfer" for android
Fetching plugin "cordova-plugin-file" via npm
Installing "cordova-plugin-file" for android
Installing "cordova-plugin-file" for android
The Android Persistent storage location now defaults to "Internal". Please
check this plugins README to see if you application needs any changes in its
config.xml.
If this is a new application no changes are required.
If this is an update to an existing application that did not specify an
"AndroidPersistentFileLocation" you may need to add:
"<preference name="AndroidPersistentFileLocation"
value="Compatibility" />"
to config.xml in order for the application to find previously stored files.
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-file':Error: Uh oh!
"/Users/marcuspridham/cdvtest/platforms/android/src/org/apache/cordova/file/EncodingException.java"
already exists!
> Issue using plugin restore for plugins with common dependencies
> ---------------------------------------------------------------
>
> Key: CB-9560
> URL: https://issues.apache.org/jira/browse/CB-9560
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI
> Reporter: Marcus Pridham
>
> Running into an annoying kind of race condition similar to CB-9278 but for
> plugins. The issue comes up when you have multiple plugins being restored
> that have common dependencies.
> The way restore currently works it is adding all the plugins in config.xml at
> once. It does NOT wait for the first plugin and its dependencies to be
> installed before adding the next plugin in the config.xml. This can cause a
> plugin to be installed multiple times. You will get a message like the
> following in the console:
> Failed to install ‘cordova-plugin-inappbrowser':Error: Uh oh!
> "/Users/i827005/dev/source/odata-demo/platforms/ios/ODataDemo/Plugins/cordova-plugin-inappbrowser/CDVInAppBrowser.m"
> already exists!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]