Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3E049200D1D for ; Sat, 30 Sep 2017 01:31:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3C6041609D1; Fri, 29 Sep 2017 23:31:17 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 870D91609EE for ; Sat, 30 Sep 2017 01:31:15 +0200 (CEST) Received: (qmail 54469 invoked by uid 500); 29 Sep 2017 23:31:14 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 54458 invoked by uid 99); 29 Sep 2017 23:31:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2017 23:31:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id EAC471A2032 for ; Fri, 29 Sep 2017 23:31:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_SHORT=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id hpGAMhBrMzof for ; Fri, 29 Sep 2017 23:31:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 1A1B85F3CF for ; Fri, 29 Sep 2017 23:31:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C17D2E0D73 for ; Fri, 29 Sep 2017 23:31:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D50E0242BA for ; Fri, 29 Sep 2017 23:31:01 +0000 (UTC) Date: Fri, 29 Sep 2017 23:31:01 +0000 (UTC) From: "Steve Gill (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-13308) Error on installation of a plugin's dependency that is also a direct dependency MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 29 Sep 2017 23:31:17 -0000 [ https://issues.apache.org/jira/browse/CB-13308?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D161866= 78#comment-16186678 ]=20 Steve Gill commented on CB-13308: --------------------------------- I believe this might be related to CB-13252 > Error on installation of a plugin's dependency that is also a direct depe= ndency > -------------------------------------------------------------------------= ------ > > Key: CB-13308 > URL: https://issues.apache.org/jira/browse/CB-13308 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-lib > Affects Versions: cordova@7.0.0 > Environment: I'm using the following versions on Ubuntu Linux: > {quote}=E2=9C=94 ~ > $ node --version > v8.3.0 > =E2=9C=94 ~ > $ npm --version > 5.4.2 > =E2=9C=94 ~ > $ cordova --version > 7.0.2-nightly.2017.9.20.596da5df (cordova-lib@7.0.2-nightly.2017.9.20.701= c15fe){quote} > Reporter: Mathis Hofer > Labels: tools-next > > h1. Summary > I'm using the plugins cordova-plugin-device and cordova-plugin-background= -mode (which itself depends on cordova-plugin-device) in a project. The fol= lowing error occurred, when the background-mode plugins was defined before = the device plugin in config.xml: > {quote}Failed to install 'cordova-plugin-background-mode': Error > at /home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cordova/no= de_modules/cordova-lib/src/plugman/fetch.js:215:37 > at _rejected (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules= /cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24) > at /home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cordova/no= de_modules/cordova-fetch/node_modules/q/q.js:890:30 > at Promise.when (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modu= les/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31) > at Promise.promise.promiseDispatch (/home/mhofer/.nvm/versions/node/v= 8.3.0/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.= js:808:41) > at /home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cordova/no= de_modules/cordova-fetch/node_modules/q/q.js:624:44 > at runSingle (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules= /cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13) > at flush (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cor= dova/node_modules/cordova-fetch/node_modules/q/q.js:125:13) > at _combinedTickCallback (internal/process/next_tick.js:131:7) > at process._tickCallback (internal/process/next_tick.js:180:9){quote} > This error does not happen, if cordova-plugin-device is not defined as di= rect dependency, or if it is defined before background-mode in config.xml. > h1. Steps to reproduce > I setup a brand new project: > {quote}=E2=9C=94 ~ > $ cordova create hello com.example.hello HelloWorld > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > Creating a new cordova project. > =E2=9C=94 ~ > $ cd hello/ > =E2=9C=94 ~/hello > $ cordova platform add android > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > Using cordova-fetch for cordova-android@6.3.0-nightly.2017.9.20.dddb2837 > Warning: using prerelease platform android@6.3.0-nightly.2017.9.20.dddb28= 37. > Use 'cordova platform add android@latest' to add the latest published ver= sion instead. > Adding android project... > Creating Cordova project for the Android platform: > Path: platforms/android > Package: com.example.hello > Name: HelloWorld > Activity: MainActivity > Android target: android-26 > Subproject Path: CordovaLib > Android project created with cordova-android@6.3.0-nightly.2017.9.20.dddb= 2837 > 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 th= an 4.0. If you have a previous platform version, you do *not* need this plu= gin 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@~6.3.0-nightly.2017.9.20.dddb2837 into config.xml file ...= }} > {quote} > I add the device plugin: > {quote}=E2=9C=94 ~/hello > $ cordova plugin add cordova-plugin-device > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > Installing "cordova-plugin-device" for android > Adding cordova-plugin-device to package.json > Saved plugin info for "cordova-plugin-device" to config.xml > =E2=9C=94 ~/hello > $ cat package.json > { > "name": "com.example.hello", > "displayName": "HelloWorld", > "version": "1.0.0", > "description": "A sample Apache Cordova application that responds to the = deviceready event.", > "main": "index.js", > "scripts": { > "test": "echo \"Error: no test specified\" && exit 1" > }, > "author": "Apache Cordova Team", > "license": "Apache-2.0", > "dependencies": { > "cordova-android": "^6.3.0-nightly.2017.9.20.dddb2837", > "cordova-plugin-device": "^1.1.6", > "cordova-plugin-whitelist": "^1.3.2" > }, > "cordova": { > "plugins": { > "cordova-plugin-whitelist": {}, > "cordova-plugin-device": {} > }, > "platforms": [ > "android" > ] > } > }=E2=9C=94 ~/hello > $ cat config.xml > > > HelloWorld > > A sample Apache Cordova application that responds to the deviceready even= t. > > > Apache Cordova Team > > > > > > > > > > > > > > > > > > > > {quote} > When removing the platforms and plugins directories and doing a _cordova = prepare_, everything looks fine: > {quote}=E2=9C=94 ~/hello > $ rm -rf platforms/ plugins/ > =E2=9C=94 ~/hello > $ cordova prepare --verbose > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > No scripts found for hook "before_prepare". > Checking config.xml and package.json for saved platforms that haven't bee= n added to the project > Config.xml and package.json platforms are the same. No pkg.json modificat= ion. > Package.json and config.xml platforms are different. Updating config.xml = with most current list of platforms. > Discovered platform "android@^6.3.0-nightly.2017.9.20.dddb2837" in config= .xml or package.json. Adding it to the project > No scripts found for hook "before_platform_add". > Using cordova-fetch for cordova-android@^6.3.0-nightly.2017.9.20.dddb2837 > Running command: npm install cordova-android@^6.3.0-nightly.2017.9.20.ddd= b2837 > Command finished with error code 0: npm install,cordova-android@^6.3.0-ni= ghtly.2017.9.20.dddb2837 > Removing "cordova-" prefix from cordova-android > Warning: using prerelease platform android@6.3.0-nightly.2017.9.21.dddb28= 37. > Use 'cordova platform add android@latest' to add the latest published ver= sion instead. > Adding android project... > PlatformApi successfully found for platform android > Creating Cordova project for the Android platform: > Path: platforms/android > Package: com.example.hello > Name: HelloWorld > Activity: MainActivity > Android target: android-26 > Copying android template project to platforms/android > Subproject Path: CordovaLib > Android project created with cordova-android@6.3.0-nightly.2017.9.21.dddb= 2837 > Saving android@6.3.0-nightly.2017.9.21.dddb2837 into platforms.json > No scripts found for hook "after_platform_add". > PlatformApi successfully found for platform android > Checking config.xml for saved plugins that haven't been added to the proj= ect > Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to = the project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-whitelist@^1.3.2" > Running command: npm install cordova-plugin-whitelist@^1.3.2 > Command finished with error code 0: npm install,cordova-plugin-whitelist@= ^1.3.2 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-whitelist"= =3D> "/home/mhofer/hello/plugins/cordova-plugin-whitelist" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-whitelist" for platform "android > Installing "cordova-plugin-whitelist" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Finding scripts for "before_plugin_install" hook from plugin cordova-plug= in-whitelist on android platform only. > No scripts found for hook "before_plugin_install". > Install start for "cordova-plugin-whitelist" on android. > Beginning processing of action stack for android project... > Action stack processing complete. > Install complete for cordova-plugin-whitelist on android. > This plugin is only applicable for versions of cordova-and= roid greater than 4.0. If you have a previous platform version, you do *not= * need this plugin since the whitelist will be built in. > Finding scripts for "after_plugin_install" hook from plugin cordova-plugi= n-whitelist on android platform only. > No scripts found for hook "after_plugin_install". > No scripts found for hook "after_plugin_add". > Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the= project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-device@^1.1.6" > Running command: npm install cordova-plugin-device@^1.1.6 > Command finished with error code 0: npm install,cordova-plugin-device@^1.= 1.6 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-device" = =3D> "/home/mhofer/hello/plugins/cordova-plugin-device" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-device" for platform "android > Installing "cordova-plugin-device" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Finding scripts for "before_plugin_install" hook from plugin cordova-plug= in-device on android platform only. > No scripts found for hook "before_plugin_install". > Install start for "cordova-plugin-device" on android. > Beginning processing of action stack for android project... > Action stack processing complete. > Install complete for cordova-plugin-device on android. > Finding scripts for "after_plugin_install" hook from plugin cordova-plugi= n-device on android platform only. > No scripts found for hook "after_plugin_install". > No scripts found for hook "after_plugin_add". > Checking for any plugins added to the project that have not been installe= d in android platform > No differences found between plugins added to project and installed in an= droid platform. Continuing... > Generating platform-specific config.xml from defaults for android at /hom= e/mhofer/hello/platforms/android/res/xml/config.xml > Merging project's config.xml into platform-specific android config.xml > Merging and updating files from [www, platforms/android/platform_www] to = platforms/android/assets/www > mkdir platforms/android/assets/www/cordova-js-src > mkdir platforms/android/assets/www/cordova-js-src/android > copy platforms/android/platform_www/cordova-js-src/android/nativeapiprov= ider.js platforms/android/assets/www/cordova-js-src/android/nativeapiprovid= er.js (new file) > copy platforms/android/platform_www/cordova-js-src/android/promptbasedna= tiveapi.js platforms/android/assets/www/cordova-js-src/android/promptbasedn= ativeapi.js (new file) > copy platforms/android/platform_www/cordova-js-src/exec.js platforms/and= roid/assets/www/cordova-js-src/exec.js (new file) > copy platforms/android/platform_www/cordova-js-src/platform.js platforms= /android/assets/www/cordova-js-src/platform.js (new file) > mkdir platforms/android/assets/www/cordova-js-src/plugin > mkdir platforms/android/assets/www/cordova-js-src/plugin/android > copy platforms/android/platform_www/cordova-js-src/plugin/android/app.js= platforms/android/assets/www/cordova-js-src/plugin/android/app.js (new fil= e) > copy platforms/android/platform_www/cordova.js platforms/android/assets/= www/cordova.js (updated file) > copy platforms/android/platform_www/cordova_plugins.js platforms/android= /assets/www/cordova_plugins.js (updated file) > delete platforms/android/assets/www/img/cordova.png (no source) > copy www/index.html platforms/android/assets/www/index.html (updated fil= e) > copy www/js/index.js platforms/android/assets/www/js/index.js (updated f= ile) > copy platforms/android/platform_www/plugins/cordova-plugin-device/www/de= vice.js platforms/android/assets/www/plugins/cordova-plugin-device/www/devi= ce.js (updated file) > Wrote out android application name "HelloWorld" to /home/mhofer/hello/pla= tforms/android/res/values/strings.xml > android-versionCode not found in config.xml. Generating a code based on v= ersion in config.xml (1.0.0): 10000 > Wrote out Android package name "com.example.hello" to /home/mhofer/hello/= platforms/android/src/com/example/hello/MainActivity.java > This app does not have launcher icons defined > This app does not have splash screens defined > This app does not have additional resource files defined > Prepared android project successfully > No scripts found for hook "after_prepare".{quote} > I then add the background-mode plugin: > {quote}=E2=9C=94 ~/hello > $ cordova plugin add cordova-plugin-background-mode > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > Installing "cordova-plugin-background-mode" for android > Plugin dependency "cordova-plugin-device@1.1.6" already fetched, using th= at version. > Dependent plugin "cordova-plugin-device" already installed on android. > Adding cordova-plugin-background-mode to package.json > Saved plugin info for "cordova-plugin-background-mode" to config.xml > =E2=9C=94 ~/hello > $ cat package.json > { > "name": "com.example.hello", > "displayName": "HelloWorld", > "version": "1.0.0", > "description": "A sample Apache Cordova application that responds to the = deviceready event.", > "main": "index.js", > "scripts": { > "test": "echo \"Error: no test specified\" && exit 1" > }, > "author": "Apache Cordova Team", > "license": "Apache-2.0", > "dependencies": { > "cordova-android": "^6.3.0-nightly.2017.9.21.dddb2837", > "cordova-plugin-background-mode": "^0.7.2", > "cordova-plugin-device": "^1.1.6", > "cordova-plugin-whitelist": "^1.3.2" > }, > "cordova": { > "plugins": { > "cordova-plugin-whitelist": {}, > "cordova-plugin-device": {}, > "cordova-plugin-background-mode": {} > }, > "platforms": [ > "android" > ] > } > }=E2=9C=94 ~/hello > $ cat config.xml > > > HelloWorld > > A sample Apache Cordova application that responds to the deviceready even= t. > > > Apache Cordova Team > > > > > > > > > > > > > > > > > > > > > {quote} > Still, the prepare works as expected: > {quote}=E2=9C=94 ~/hello > $ rm -rf platforms/ plugins/ > =E2=9C=94 ~/hello > $ cordova prepare --verbose > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > No scripts found for hook "before_prepare". > Checking config.xml and package.json for saved platforms that haven't bee= n added to the project > Config.xml and package.json platforms are the same. No pkg.json modificat= ion. > Package.json and config.xml platforms are different. Updating config.xml = with most current list of platforms. > Discovered platform "android@^6.3.0-nightly.2017.9.21.dddb2837" in config= .xml or package.json. Adding it to the project > No scripts found for hook "before_platform_add". > Using cordova-fetch for cordova-android@^6.3.0-nightly.2017.9.21.dddb2837 > Running command: npm install cordova-android@^6.3.0-nightly.2017.9.21.ddd= b2837 > Command finished with error code 0: npm install,cordova-android@^6.3.0-ni= ghtly.2017.9.21.dddb2837 > Removing "cordova-" prefix from cordova-android > Warning: using prerelease platform android@6.3.0-nightly.2017.9.21.dddb28= 37. > Use 'cordova platform add android@latest' to add the latest published ver= sion instead. > Adding android project... > PlatformApi successfully found for platform android > Creating Cordova project for the Android platform: > Path: platforms/android > Package: com.example.hello > Name: HelloWorld > Activity: MainActivity > Android target: android-26 > Copying android template project to platforms/android > Subproject Path: CordovaLib > Android project created with cordova-android@6.3.0-nightly.2017.9.21.dddb= 2837 > Saving android@6.3.0-nightly.2017.9.21.dddb2837 into platforms.json > No scripts found for hook "after_platform_add". > PlatformApi successfully found for platform android > Checking config.xml for saved plugins that haven't been added to the proj= ect > Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to = the project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-whitelist@^1.3.2" > Running command: npm install cordova-plugin-whitelist@^1.3.2 > Command finished with error code 0: npm install,cordova-plugin-whitelist@= ^1.3.2 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-whitelist"= =3D> "/home/mhofer/hello/plugins/cordova-plugin-whitelist" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-whitelist" for platform "android > Installing "cordova-plugin-whitelist" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Finding scripts for "before_plugin_install" hook from plugin cordova-plug= in-whitelist on android platform only. > No scripts found for hook "before_plugin_install". > Install start for "cordova-plugin-whitelist" on android. > Beginning processing of action stack for android project... > Action stack processing complete. > Install complete for cordova-plugin-whitelist on android. > This plugin is only applicable for versions of cordova-and= roid greater than 4.0. If you have a previous platform version, you do *not= * need this plugin since the whitelist will be built in. > Finding scripts for "after_plugin_install" hook from plugin cordova-plugi= n-whitelist on android platform only. > No scripts found for hook "after_plugin_install". > No scripts found for hook "after_plugin_add". > Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the= project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-device@^1.1.6" > Running command: npm install cordova-plugin-device@^1.1.6 > Command finished with error code 0: npm install,cordova-plugin-device@^1.= 1.6 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-device" = =3D> "/home/mhofer/hello/plugins/cordova-plugin-device" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-device" for platform "android > Installing "cordova-plugin-device" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Finding scripts for "before_plugin_install" hook from plugin cordova-plug= in-device on android platform only. > No scripts found for hook "before_plugin_install". > Install start for "cordova-plugin-device" on android. > Beginning processing of action stack for android project... > Action stack processing complete. > Install complete for cordova-plugin-device on android. > Finding scripts for "after_plugin_install" hook from plugin cordova-plugi= n-device on android platform only. > No scripts found for hook "after_plugin_install". > No scripts found for hook "after_plugin_add". > Discovered plugin "cordova-plugin-background-mode" in config.xml. Adding = it to the project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-background-mode@^0.7.2" > Running command: npm install cordova-plugin-background-mode@^0.7.2 > Command finished with error code 0: npm install,cordova-plugin-background= -mode@^0.7.2 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-background= -mode" =3D> "/home/mhofer/hello/plugins/cordova-plugin-background-mode" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-background-mode" for platform "android > Installing "cordova-plugin-background-mode" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Dependencies detected, iterating through them... > Requesting plugin "cordova-plugin-device". > Plugin dependency "cordova-plugin-device@1.1.6" already fetched, using th= at version. > Dependent plugin "cordova-plugin-device" already installed on android. > Finding scripts for "before_plugin_install" hook from plugin cordova-plug= in-background-mode on android platform only. > No scripts found for hook "before_plugin_install". > Install start for "cordova-plugin-background-mode" on android. > Beginning processing of action stack for android project... > Action stack processing complete. > Install complete for cordova-plugin-background-mode on android. > Finding scripts for "after_plugin_install" hook from plugin cordova-plugi= n-background-mode on android platform only. > No scripts found for hook "after_plugin_install". > No scripts found for hook "after_plugin_add". > Checking for any plugins added to the project that have not been installe= d in android platform > No differences found between plugins added to project and installed in an= droid platform. Continuing... > Generating platform-specific config.xml from defaults for android at /hom= e/mhofer/hello/platforms/android/res/xml/config.xml > Merging project's config.xml into platform-specific android config.xml > Merging and updating files from [www, platforms/android/platform_www] to = platforms/android/assets/www > mkdir platforms/android/assets/www/cordova-js-src > mkdir platforms/android/assets/www/cordova-js-src/android > copy platforms/android/platform_www/cordova-js-src/android/nativeapipr= ovider.js platforms/android/assets/www/cordova-js-src/android/nativeapiprov= ider.js (new file) > copy platforms/android/platform_www/cordova-js-src/android/promptbased= nativeapi.js platforms/android/assets/www/cordova-js-src/android/promptbase= dnativeapi.js (new file) > copy platforms/android/platform_www/cordova-js-src/exec.js platforms/a= ndroid/assets/www/cordova-js-src/exec.js (new file) > copy platforms/android/platform_www/cordova-js-src/platform.js platfor= ms/android/assets/www/cordova-js-src/platform.js (new file) > mkdir platforms/android/assets/www/cordova-js-src/plugin > mkdir platforms/android/assets/www/cordova-js-src/plugin/android > copy platforms/android/platform_www/cordova-js-src/plugin/android/app.= js platforms/android/assets/www/cordova-js-src/plugin/android/app.js (new f= ile) > copy platforms/android/platform_www/cordova.js platforms/android/asset= s/www/cordova.js (updated file) > copy platforms/android/platform_www/cordova_plugins.js platforms/andro= id/assets/www/cordova_plugins.js (updated file) > delete platforms/android/assets/www/img/cordova.png (no source) > copy www/index.html platforms/android/assets/www/index.html (updated f= ile) > copy www/js/index.js platforms/android/assets/www/js/index.js (updated= file) > copy platforms/android/platform_www/plugins/cordova-plugin-background-= mode/www/background-mode.js platforms/android/assets/www/plugins/cordova-pl= ugin-background-mode/www/background-mode.js (updated file) > copy platforms/android/platform_www/plugins/cordova-plugin-device/www/= device.js platforms/android/assets/www/plugins/cordova-plugin-device/www/de= vice.js (updated file) > Wrote out android application name "HelloWorld" to /home/mhofer/hello/pla= tforms/android/res/values/strings.xml > android-versionCode not found in config.xml. Generating a code based on v= ersion in config.xml (1.0.0): 10000 > Wrote out Android package name "com.example.hello" to /home/mhofer/hello/= platforms/android/src/com/example/hello/MainActivity.java > This app does not have launcher icons defined > This app does not have splash screens defined > This app does not have additional resource files defined > Prepared android project successfully > No scripts found for hook "after_prepare".{quote} > I now switch the order of these two plugins in config.xml: > {quote}=E2=9C=94 ~/hello > $ cat config.xml > > > HelloWorld > > A sample Apache Cordova application that responds to the deviceready even= t. > > > Apache Cordova Team > > > > > > > > > > > > > > > > > > > > > {quote} > And again do the prepare, this time it causes the error: > {quote}=E2=9C=94 ~/hello > $ rm -rf platforms/ plugins/ > =E2=9C=94 ~/hello > $ cordova prepare --verbose > Warning: using prerelease version 7.0.2-nightly.2017.9.20.596da5df (cordo= va-lib@7.0.2-nightly.2017.9.20.701c15fe) > No scripts found for hook "before_prepare". > Checking config.xml and package.json for saved platforms that haven't bee= n added to the project > Config.xml and package.json platforms are the same. No pkg.json modificat= ion. > Package.json and config.xml platforms are different. Updating config.xml = with most current list of platforms. > Discovered platform "android@^6.3.0-nightly.2017.9.21.dddb2837" in config= .xml or package.json. Adding it to the project > No scripts found for hook "before_platform_add". > Using cordova-fetch for cordova-android@^6.3.0-nightly.2017.9.21.dddb2837 > Running command: npm install cordova-android@^6.3.0-nightly.2017.9.21.ddd= b2837 > Command finished with error code 0: npm install,cordova-android@^6.3.0-ni= ghtly.2017.9.21.dddb2837 > Removing "cordova-" prefix from cordova-android > Warning: using prerelease platform android@6.3.0-nightly.2017.9.21.dddb28= 37. > Use 'cordova platform add android@latest' to add the latest published ver= sion instead. > Adding android project... > PlatformApi successfully found for platform android > Creating Cordova project for the Android platform: > Path: platforms/android > Package: com.example.hello > Name: HelloWorld > Activity: MainActivity > Android target: android-26 > Copying android template project to platforms/android > Subproject Path: CordovaLib > Android project created with cordova-android@6.3.0-nightly.2017.9.21.dddb= 2837 > Saving android@6.3.0-nightly.2017.9.21.dddb2837 into platforms.json > No scripts found for hook "after_platform_add". > PlatformApi successfully found for platform android > Checking config.xml for saved plugins that haven't been added to the proj= ect > Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to = the project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-whitelist@^1.3.2" > Running command: npm install cordova-plugin-whitelist@^1.3.2 > Command finished with error code 0: npm install,cordova-plugin-whitelist@= ^1.3.2 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-whitelist"= =3D> "/home/mhofer/hello/plugins/cordova-plugin-whitelist" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-whitelist" for platform "android > Installing "cordova-plugin-whitelist" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Finding scripts for "before_plugin_install" hook from plugin cordova-plug= in-whitelist on android platform only. > No scripts found for hook "before_plugin_install". > Install start for "cordova-plugin-whitelist" on android. > Beginning processing of action stack for android project... > Action stack processing complete. > Install complete for cordova-plugin-whitelist on android. > This plugin is only applicable for versions of cordova-android greater th= an 4.0. If you have a previous platform version, you do *not* need this plu= gin since the whitelist will be built in. > Finding scripts for "after_plugin_install" hook from plugin cordova-plugi= n-whitelist on android platform only. > No scripts found for hook "after_plugin_install". > No scripts found for hook "after_plugin_add". > Discovered plugin "cordova-plugin-background-mode" in config.xml. Adding = it to the project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-background-mode@^0.7.2" > Running command: npm install cordova-plugin-background-mode@^0.7.2 > Command finished with error code 0: npm install,cordova-plugin-background= -mode@^0.7.2 > Copying plugin "/home/mhofer/hello/node_modules/cordova-plugin-background= -mode" =3D> "/home/mhofer/hello/plugins/cordova-plugin-background-mode" > Calling plugman.install on plugin "/home/mhofer/hello/plugins/cordova-plu= gin-background-mode" for platform "android > Installing "cordova-plugin-background-mode" for android > Running command: /home/mhofer/hello/platforms/android/cordova/version > Command finished with error code 0: /home/mhofer/hello/platforms/android/= cordova/version > Dependencies detected, iterating through them... > Requesting plugin "cordova-plugin-device". > Plugin dependency "cordova-plugin-device" not fetched, retrieving then in= stalling. > Running command: npm install cordova-plugin-device > Command finished with error code 0: npm install,cordova-plugin-device > Failed to install 'cordova-plugin-background-mode': Error > at /home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cordova/no= de_modules/cordova-lib/src/plugman/fetch.js:215:37 > at _rejected (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules= /cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24) > at /home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cordova/no= de_modules/cordova-fetch/node_modules/q/q.js:890:30 > at Promise.when (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modu= les/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31) > at Promise.promise.promiseDispatch (/home/mhofer/.nvm/versions/node/v= 8.3.0/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.= js:808:41) > at /home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cordova/no= de_modules/cordova-fetch/node_modules/q/q.js:624:44 > at runSingle (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules= /cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13) > at flush (/home/mhofer/.nvm/versions/node/v8.3.0/lib/node_modules/cor= dova/node_modules/cordova-fetch/node_modules/q/q.js:125:13) > at _combinedTickCallback (internal/process/next_tick.js:131:7) > at process._tickCallback (internal/process/next_tick.js:180:9) > Failed to restore plugin "cordova-plugin-background-mode" from config.xml= . You might need to try adding it again. Error: Failed to fetch plugin cord= ova-plugin-device via registry. > Probably this is either a connection problem, or plugin spec is incorrect= . > Check your connection and plugin name/version/URL. > Failed to get absolute path to installed module > Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the= project > No scripts found for hook "before_plugin_add". > Calling plugman.fetch on plugin "cordova-plugin-device@^1.1.6" > Running command: npm install cordova-plugin-device@^1.1.6 > Command finished with error code 216: npm install,cordova-plugin-device@^= 1.1.6 > Failed to restore plugin "cordova-plugin-device" from config.xml. You mig= ht need to try adding it again. Error: Failed to fetch plugin cordova-plugi= n-device@^1.1.6 via registry. > Probably this is either a connection problem, or plugin spec is incorrect= . > Check your connection and plugin name/version/URL. > Error: npm: Command failed with exit code 216 Error output: > npm WARN checkPermissions Missing write access to /home/mhofer/hello/node= _modules/cordova-plugin-device > npm WARN com.example.hello@1.0.0 No repository field. > npm ERR! path /home/mhofer/hello/node_modules/cordova-plugin-device > npm ERR! code ELOOP > npm ERR! errno -40 > npm ERR! syscall access > npm ERR! ELOOP: too many symbolic links encountered, access '/home/mhofer= /hello/node_modules/cordova-plugin-device' > npm ERR! A complete log of this run can be found in: > npm ERR! /home/mhofer/.npm/_logs/2017-09-21T15_28_52_386Z-debug.log > Checking for any plugins added to the project that have not been installe= d in android platform > No differences found between plugins added to project and installed in an= droid platform. Continuing... > Generating platform-specific config.xml from defaults for android at /hom= e/mhofer/hello/platforms/android/res/xml/config.xml > Merging project's config.xml into platform-specific android config.xml > Merging and updating files from [www, platforms/android/platform_www] to = platforms/android/assets/www > mkdir platforms/android/assets/www/cordova-js-src > mkdir platforms/android/assets/www/cordova-js-src/android > copy platforms/android/platform_www/cordova-js-src/android/nativeapipr= ovider.js platforms/android/assets/www/cordova-js-src/android/nativeapiprov= ider.js (new file) > copy platforms/android/platform_www/cordova-js-src/android/promptbased= nativeapi.js platforms/android/assets/www/cordova-js-src/android/promptbase= dnativeapi.js (new file) > copy platforms/android/platform_www/cordova-js-src/exec.js platforms/a= ndroid/assets/www/cordova-js-src/exec.js (new file) > copy platforms/android/platform_www/cordova-js-src/platform.js platfor= ms/android/assets/www/cordova-js-src/platform.js (new file) > mkdir platforms/android/assets/www/cordova-js-src/plugin > mkdir platforms/android/assets/www/cordova-js-src/plugin/android > copy platforms/android/platform_www/cordova-js-src/plugin/android/app.= js platforms/android/assets/www/cordova-js-src/plugin/android/app.js (new f= ile) > copy platforms/android/platform_www/cordova.js platforms/android/asset= s/www/cordova.js (updated file) > copy platforms/android/platform_www/cordova_plugins.js platforms/andro= id/assets/www/cordova_plugins.js (updated file) > delete platforms/android/assets/www/img/cordova.png (no source) > copy www/index.html platforms/android/assets/www/index.html (updated f= ile) > copy www/js/index.js platforms/android/assets/www/js/index.js (updated= file) > Wrote out android application name "HelloWorld" to /home/mhofer/hello/pla= tforms/android/res/values/strings.xml > android-versionCode not found in config.xml. Generating a code based on v= ersion in config.xml (1.0.0): 10000 > Wrote out Android package name "com.example.hello" to /home/mhofer/hello/= platforms/android/src/com/example/hello/MainActivity.java > This app does not have launcher icons defined > This app does not have splash screens defined > This app does not have additional resource files defined > Prepared android project successfully > No scripts found for hook "after_prepare".{quote} > Notice how the version of the device plugin has been modifed and _node_mo= dules/cordova-plugin-device_ is now a symlink pointing to itself: > {quote}=E2=9C=94 ~/hello > $ cat package.json > { > "name": "com.example.hello", > "displayName": "HelloWorld", > "version": "1.0.0", > "description": "A sample Apache Cordova application that responds to th= e deviceready event.", > "main": "index.js", > "scripts": \{ > "test": "echo \"Error: no test specified\" && exit 1" > \}, > "author": "Apache Cordova Team", > "license": "Apache-2.0", > "dependencies": \{ > "cordova-android": "^6.3.0-nightly.2017.9.21.dddb2837", > "cordova-plugin-background-mode": "^0.7.2", > "cordova-plugin-device": "file:node_modules/cordova-plugin-device", > "cordova-plugin-whitelist": "^1.3.2" > \}, > "cordova": \{ > "plugins": \{ > "cordova-plugin-whitelist": {}, > "cordova-plugin-device": {}, > "cordova-plugin-background-mode": {} > \}, > "platforms": \[ > "android" > \] > \} > } > =E2=9C=94 ~/hello > $ cat config.xml > > > HelloWorld > > A sample Apache Cordova application that responds to the devicere= ady event. > > > Apache Cordova Team > > > > > > > > > > > > > > > > > > > > > > =E2=9C=94 ~/hello > $ ls \-ld node_modules/cordova-* > drwxrwxr-x 9 mhofer mhofer 4096 Sep 21 17:28 node_modules/cordova-android > drwxrwxr-x 4 mhofer mhofer 4096 Sep 21 17:28 node_modules/cordova-plugin-= background-mode > lrwxrwxrwx 1 mhofer mhofer 21 Sep 21 17:28 node_modules/cordova-plugin-= device -> cordova-plugin-device > drwxrwxr-x 5 mhofer mhofer 4096 Sep 21 17:28 node_modules/cordova-plugin-= whitelist{quote} > The same error occures, if I add the background-plugin first, then the de= vice plugin. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org