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 02E83200C4D for ; Tue, 21 Mar 2017 16:10:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 01AB6160B68; Tue, 21 Mar 2017 15:10:48 +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 4E346160B74 for ; Tue, 21 Mar 2017 16:10:47 +0100 (CET) Received: (qmail 85251 invoked by uid 500); 21 Mar 2017 15:10:46 -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 85229 invoked by uid 99); 21 Mar 2017 15:10:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2017 15:10:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EDAC318028D for ; Tue, 21 Mar 2017 15:10:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.348 X-Spam-Level: X-Spam-Status: No, score=-99.348 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id uPHyz57uRikp for ; Tue, 21 Mar 2017 15:10:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9268660CFD for ; Tue, 21 Mar 2017 15:10:44 +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 B8371E0A75 for ; Tue, 21 Mar 2017 15:10:42 +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 6B586254D7 for ; Tue, 21 Mar 2017 15:10:42 +0000 (UTC) Date: Tue, 21 Mar 2017 15:10:42 +0000 (UTC) From: "Philipp Kursawe (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CB-12594) Local development of plugins with variables need variables in fetch.json MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 21 Mar 2017 15:10:48 -0000 Philipp Kursawe created CB-12594: ------------------------------------ Summary: Local development of plugins with variables need variables in fetch.json Key: CB-12594 URL: https://issues.apache.org/jira/browse/CB-12594 Project: Apache Cordova Issue Type: Bug Components: Android, CLI, iOS, Plugins Reporter: Philipp Kursawe Consider a plugin that defined a preference in its plugin.xml When you use the CLI feature to save plugins into config.xml and also add the variables for this plugin, the CLI complains when adding the plugin during platform restore (missing variables): {code:title=plugin.xml} {code} {code:title=config.xml} {code} When removing a platform and re-adding it this is the result: {code} Installing "cordova-plugin" for android Failed to install 'cordova-plugin':Error: Variable(s) missing: COMPANY_NAME at /Users/xxx/.nvm/versions/node/v6.2.0/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:362:23 at _fulfilled (/Users/xxx/.nvm/versions/node/v6.2.0/lib/node_modules/cordova/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/Users/xxx/.nvm/versions/node/v6.2.0/lib/node_modules/cordova/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/Users/xxx/.nvm/versions/node/v6.2.0/lib/node_modules/cordova/node_modules/q/q.js:749:13) at /Users/xxx/.nvm/versions/node/v6.2.0/lib/node_modules/cordova/node_modules/q/q.js:557:44 at flush (/Users/xxx/.nvm/versions/node/v6.2.0/lib/node_modules/cordova/node_modules/q/q.js:108:17) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9) Error: Variable(s) missing: INSERT_COMPANY_NAME {code} It seems, the CLI checks the fetch.json file, and if that does not contain the variables, it fails with this error. Manually adding the variables to the fetch.json file, or re-installing the plugin helps (reinstalling rewrites the fetch.json file). That means, if we add a variable to our plugin during plugin development, we would have to remove the plugin (unlink) it first, and then re-add it, specifying all the variables at the CLI. How it should actually work is that config.xml has precedence over whatever it says in fetch.json. Or get rid of fetch.json alltogether. I think its only there for historical reasons? -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org