You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vladimir Kotikov (JIRA)" <ji...@apache.org> on 2016/02/25 09:27:18 UTC

[jira] [Comment Edited] (CB-10583) Adding multiple platforms at once fails to install plugin(s) from a Git repo

    [ https://issues.apache.org/jira/browse/CB-10583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15166905#comment-15166905 ] 

Vladimir Kotikov edited comment on CB-10583 at 2/25/16 8:27 AM:
----------------------------------------------------------------

This does repro with local crosswalk repo as well. Anyway, the bug is caused by combination of two problems:
1. We're iterating throug array using {{for ... in ... }} [here|https://github.com/apache/cordova-lib/blob/master/cordova-common/src/PluginInfo/PluginInfo.js#L51]
2. They (crosswalk) modify {{Array.prototype}} [here|https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview/blob/master/hooks/ios/after_plugin_install/000-update_xcode_config.js#L112-L117], so the new method appears while going through array


was (Author: vladimir.kotikov):
This does repro with local crosswalk repo as well. Anyway, the bug is caused by combination of two problems:
1. We're iterating throug array using {{for ... in ... }}
2. They (crosswalk) modify {{Array.prototype}}, so the new prototype's method appears while going through array

> Adding multiple platforms at once fails to install plugin(s) from a Git repo
> ----------------------------------------------------------------------------
>
>                 Key: CB-10583
>                 URL: https://issues.apache.org/jira/browse/CB-10583
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 6.0.0
>         Environment: OS: Mac OS X El Capitan
> Node Version: v4.3.0
> Xcode version: Xcode 7.2.1 Build version 7C1002 
> Cordova CLI: 6.0.0
>            Reporter: Zarko Hristovski
>            Assignee: Vladimir Kotikov
>              Labels: mustfix, triaged
>         Attachments: configTest.zip
>
>
> I get a plugin installation failure when trying to add both ios and android as platforms at the same time. But this seems to happen only when the plugin spec value points to its Git repository.
> I have
> {noformat}
> <plugin name="cordova-plugin-crosswalk-webview" spec="https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git#master" />
> {noformat}
> specified in the config.xml
> {noformat}
> $ cordova platform add ios android
> Adding ios project...
> Running command: /Users/zarko/.cordova/lib/npm_cache/cordova-ios/3.9.2/package/bin/create /Users/zarko/temp/configTest/platforms/ios io.cordova.hellocordova HelloCordova --cli
> iOS project created with cordova-ios@3.9.2
> Discovered plugin "cordova-plugin-crosswalk-webview" in config.xml. Installing to the project
> Fetching plugin "https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git" via git clone
> Repository "https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview.git" checked out to git ref "master".
> Installing "cordova-plugin-crosswalk-webview" for ios
> /Users/zarko/temp/configTest/platforms/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
> /Users/zarko/temp/configTest/platforms/ios/HelloCordova.xcodeproj/project.pbxproj
> /Users/zarko/temp/configTest/platforms/ios/CordovaLib/CordovaLib.xcodeproj/project.pbxproj
> /Users/zarko/temp/configTest/platforms/ios/HelloCordova.xcodeproj/project.pbxproj
> Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
> Fetching plugin "cordova-plugin-whitelist@1" via npm
> Adding android project...
> Creating Cordova project for the Android platform:
> 	Path: platforms/android
> 	Package: io.cordova.hellocordova
> 	Name: HelloCordova
> 	Activity: MainActivity
> 	Android target: android-23
> Android project created with cordova-android@5.1.0
> Discovered plugin "cordova-plugin-whitelist" in config.xml. Installing to the project
> Fetching plugin "cordova-plugin-whitelist@1" via npm
> Installing "cordova-plugin-crosswalk-webview" for android
> Failed to install 'cordova-plugin-crosswalk-webview':Error: Variable(s) missing: undefined
>     at /Users/zarko/.nvm/versions/node/v4.3.0/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:346:23
>     at _fulfilled (/Users/zarko/.nvm/versions/node/v4.3.0/lib/node_modules/cordova/node_modules/q/q.js:787:54)
>     at self.promiseDispatch.done (/Users/zarko/.nvm/versions/node/v4.3.0/lib/node_modules/cordova/node_modules/q/q.js:816:30)
>     at Promise.promise.promiseDispatch (/Users/zarko/.nvm/versions/node/v4.3.0/lib/node_modules/cordova/node_modules/q/q.js:749:13)
>     at /Users/zarko/.nvm/versions/node/v4.3.0/lib/node_modules/cordova/node_modules/q/q.js:557:44
>     at flush (/Users/zarko/.nvm/versions/node/v4.3.0/lib/node_modules/cordova/node_modules/q/q.js:108:17)
>     at nextTickCallbackWith0Args (node.js:419:9)
>     at process._tickCallback (node.js:348:13)
> Error: Variable(s) missing: undefined
> {noformat}
> My system information:
> OS: Mac OS X El Capitan
> Node Version: v4.3.0
> Xcode version: Xcode 7.2.1 Build version 7C1002 
> Cordova CLI: 6.0.0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org