You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2014/01/03 01:08:53 UTC
[jira] [Commented] (CB-5605) plugman install.js:68 crashes
[ https://issues.apache.org/jira/browse/CB-5605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13860991#comment-13860991 ]
Andrew Grieve commented on CB-5605:
-----------------------------------
[~ignisvulpis] has verified that this is fixed.
> plugman install.js:68 crashes
> -----------------------------
>
> Key: CB-5605
> URL: https://issues.apache.org/jira/browse/CB-5605
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugman
> Reporter: Axel Nennker
> Assignee: Steve Gill
>
> My app uses two custom plugins.
> I want to add firefoxos as a platform.
> When I issue a
> cordova platform add firefoxos
> install.js:68 fails with the message
> "Cannot access currentVersion of null"
> I guess my custom plugins' plugin.xml are wrong...
> Anyway I think that install.js should not crash here.
> I have no idea why engines[i] is null for some i.
> -Axel
> Maybe this code is a fix:
> function checkEngines(engines) {
> for(var i = 0; i < engines.length; i++) {
> var engine = engines[i];
> if(engine===null) {
> return Q.reject(new Error('Plugin doesn\'t support this project'));
> } else {
> if(semver.satisfies(engine.currentVersion, engine.minVersion) || engine.currentVersion == null){
> // engine ok!
> }else{
> return Q.reject(new Error('Plugin doesn\'t support this project\'s '+engine.name+' version. '+engine.name+': ' + engine.currentVersion + ', failed version requirement: ' + engine.minVersion));
> }
> }
> }
> return Q(true);
> }
> Although I never see the no-support output
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)