You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Tim Barham (JIRA)" <ji...@apache.org> on 2015/02/13 05:36:12 UTC
[jira] [Updated] (CB-8472) Exception (can't find config.xml)
installing platform after plugins
[ https://issues.apache.org/jira/browse/CB-8472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Barham updated CB-8472:
---------------------------
Description:
If you add a platform after adding a plugin, you can get an exception
h4. Repro steps:
# Create a new cordova app (e.g. 'cordova create TestApp').
# Add a plugin (e.g. 'cordova plugin add org.apache.cordova.camera').
# Add a platform (e.g. 'cordova platform add browser').
h4. Result:
The following error:
{code}Failed to install 'org.apache.cordova.camera':Error: ENOENT, no such file or
directory 'D:\tbarham\OneDrive\Documents\CordovaApps\TestApp\platforms\browser\config.xml'
at Error (native)
at Object.fs.openSync (fs.js:502:18)
at Object.fs.readFileSync (fs.js:354:15)
at Object.module.exports.parseElementtreeSync (D:\GIT\Cordova\cordova-lib\cordova-lib\src\util\xml-helpers.js:118:27)
at Object.module.exports.package_name (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\platforms\browser.js:51:38)
at PlatformMunger.generate_plugin_config_munge (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:264:54)
at PlatformMunger.add_plugin_changes (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:184:29)
at D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:315:14
at Array.forEach (native)
at PlatformMunger_process [as process] (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:314:45){code}
The problem is we are trying to install plugins for the platform before we call prepare() for the platform, so config.xml has not been created yet.
*Also note:* we are currently passing junk to prepare() - because of the location of the call, the local variable _platform_ is not defined, and instead we are passing a reference to a function _platform()_.
was:
If you add a platform after adding a plugin, you can get an exception
h4. Repro steps:
# Create a new cordova app (e.g. 'cordova create TestApp').
# Add a plugin (e.g. 'cordova plugin add org.apache.cordova.camera').
# Add a platform (e.g. 'cordova platform add browser').
h4. Result:
The following error:
{code}Failed to install 'org.apache.cordova.camera':Error: ENOENT, no such file or
directory 'D:\tbarham\OneDrive\Documents\CordovaApps\TestApp\platforms\browser\config.xml'
at Error (native)
at Object.fs.openSync (fs.js:502:18)
at Object.fs.readFileSync (fs.js:354:15)
at Object.module.exports.parseElementtreeSync (D:\GIT\Cordova\cordova-lib\cordova-lib\src\util\xml-helpers.js:118:27)
at Object.module.exports.package_name (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\platforms\browser.js:51:38)
at PlatformMunger.generate_plugin_config_munge (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:264:54)
at PlatformMunger.add_plugin_changes (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:184:29)
at D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:315:14
at Array.forEach (native)
at PlatformMunger_process [as process] (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:314:45){code}
The problem is we are trying to install plugins for the platform before we call prepare() for the platform, so config.xml has not been created yet.
> Exception (can't find config.xml) installing platform after plugins
> -------------------------------------------------------------------
>
> Key: CB-8472
> URL: https://issues.apache.org/jira/browse/CB-8472
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib
> Affects Versions: Master
> Reporter: Tim Barham
> Priority: Critical
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> If you add a platform after adding a plugin, you can get an exception
> h4. Repro steps:
> # Create a new cordova app (e.g. 'cordova create TestApp').
> # Add a plugin (e.g. 'cordova plugin add org.apache.cordova.camera').
> # Add a platform (e.g. 'cordova platform add browser').
> h4. Result:
> The following error:
> {code}Failed to install 'org.apache.cordova.camera':Error: ENOENT, no such file or
> directory 'D:\tbarham\OneDrive\Documents\CordovaApps\TestApp\platforms\browser\config.xml'
> at Error (native)
> at Object.fs.openSync (fs.js:502:18)
> at Object.fs.readFileSync (fs.js:354:15)
> at Object.module.exports.parseElementtreeSync (D:\GIT\Cordova\cordova-lib\cordova-lib\src\util\xml-helpers.js:118:27)
> at Object.module.exports.package_name (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\platforms\browser.js:51:38)
> at PlatformMunger.generate_plugin_config_munge (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:264:54)
> at PlatformMunger.add_plugin_changes (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:184:29)
> at D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:315:14
> at Array.forEach (native)
> at PlatformMunger_process [as process] (D:\GIT\Cordova\cordova-lib\cordova-lib\src\plugman\util\config-changes.js:314:45){code}
> The problem is we are trying to install plugins for the platform before we call prepare() for the platform, so config.xml has not been created yet.
> *Also note:* we are currently passing junk to prepare() - because of the location of the call, the local variable _platform_ is not defined, and instead we are passing a reference to a function _platform()_.
--
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